using System;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Collections;
using System.Globalization;
using System.Windows.Forms;
using C1.Win.C1Input;
using C1.Win.C1List;
using C1.Win.C1TrueDBGrid;
using PCSComProduction.DCP.BO;
using PCSComSale.Order.BO;
using PCSComUtils.Framework.ReportFrame.BO;
using PCSUtils.Framework.ReportFrame;
using PCSComMaterials.Inventory.BO;
using PCSComMaterials.Inventory.DS;
using PCSComUtils.Common;
using PCSComUtils.Common.BO;
using PCSComUtils.PCSExc;
using PCSUtils.Log;
using PCSUtils.Utils;
using AddNewModeEnum = C1.Win.C1TrueDBGrid.AddNewModeEnum;
using AlignHorzEnum = C1.Win.C1TrueDBGrid.AlignHorzEnum;
using PCSComUtils.DataContext;

namespace PCSMaterials.Inventory
{
    /// <summary>
    /// This class allows you to transfer Part number quantities from one or more locations 
    /// to one or more locations associated with the same master location
    /// </summary>
    public class IVMiscellaneousIssue : Form
    {
        #region controls & variables

        private C1DateEdit dtmPostDate;
        private C1Combo cboCCN;
        private Label lblCCN;
        private GroupBox grbSource;
        private Label lblSourceLoc;
        private Label lblSourceMasLoc;
        private Label lblSourceBin;
        private Label lblPostDate;
        private Label lblComment;
        private TextBox txtComment;
        private TextBox txtTransNo;
        private Button btnTransNo;
        private Label lblTransNo;
        private GroupBox grbDestination;
        private Label lblDestLoc;
        private Label lblDestMasLoc;
        private Label lblDestBin;
        private TextBox txtSourceMasLoc;
        private Button btnSourceMasLoc;
        private TextBox txtSourceLoc;
        private Button btnSourceLoc;
        private TextBox txtSourceBin;
        private Button btnSourceBin;
        private TextBox txtDestLoc;
        private Button btnDestLoc;
        private TextBox txtDestMasLoc;
        private Button btnDestMasLoc;
        private Button btnDestBin;
        private TextBox txtDestBin;
        private C1TrueDBGrid dgrdData;
        private Button btnClose;
        private Button btnHelp;
        private Button btnAdd;
        private Button btnSave;
        private Button btnPrint;
        /// <summary>
        /// Required designer variable.
        /// </summary>
        private Container components = null;
        private const string THIS = "PCSMaterials.Inventory.IVMiscellaneousIssue";
        private const string VIEW_NAME = "V_ProductInforWithInventory";
        private const string PART_NUMBER_FLD = "PartNumber";
        private const string PART_NAME_FLD = "PartName";
        private const string MODEL_FLD = "Model";
        private const string UNIT_FLD = "UM";
        private const string BIN_AVAILABLE_QUANTITY_FLD = "BinAvailableQuantity";
        private const string LOT_CONTROL_FLD = "LotControl";
        const string VIEW_LOCATION_CACHE = "V_ProductInLocCache";
        const string VIEW_BIN_CACHE = "V_ProductInBinCache";
        const string REQUIRED_MATERIAL_VIEW = "v_RequiredForMiscIssue";

        const string DATE_TIME_HOUR_FORMAT = "dd-MM-yyyy HH:mm";
        DateTime dtmCurrentDate;
        private DataTable dtbGridLayout;
        private DataSet dstData;
        private EnumAction FormMode = EnumAction.Default;
        private IV_MiscellaneousIssueMasterVO voMiscellaneousMaster = new IV_MiscellaneousIssueMasterVO();
        private IVMiscellaneousIssueBO boMiscellaneousIssue = new IVMiscellaneousIssueBO();
        private TextBox txtPurpose;
        private Button btnPurpose;
        private TextBox txtParty;
        private Button btnParty;
        private Button btnPartyName;
        private TextBox txtPartyName;
        private bool blnHasError;
        string strLastValidSourceBin = string.Empty;
        string strLastValidDestBin = string.Empty;
        string strLastValidDestLoc = string.Empty;
        string strLastValidSourceLoc = string.Empty;
        string strLastValidDestMasLoc = string.Empty;
        string strLastValidSouceMasLoc = string.Empty;
        string strLastValidPurpose = string.Empty;
        string strLastValidPartyName = string.Empty;
        string strLastValidPartyCode = string.Empty;
        string strLastValidFGoodsCode = string.Empty;
        string strLastValidRequireNo = string.Empty;
        DateTime dtmValidDate = DateTime.MinValue;
        private int intTransTypeID;
        private Label lblPurpose;
        private Label lblParty;
        private Button btnDelete;
        private TextBox txtRequireMaterialNo;
        private TextBox txtFGoodsCode;
        private Label lblRequireMaterialNo;
        private Button btnRequireMaterialNo;
        private Label lblFGoodsCode;
        private Button btnFGoodsCode;
        private Button btnInvoice;
        private TextBox txtInvoice;
        private Label lblInvoice;
        private InventoryUtilsBO boIVUtils = new InventoryUtilsBO();
        int purpose;
        #endregion

        public IVMiscellaneousIssue()
        {
            //
            // Required for Windows Form Designer support
            //
            InitializeComponent();

            //
            // TODO: Add any constructor code after InitializeComponent call
            //
        }

        /// <summary>
        /// Clean up any resources being used.
        /// </summary>
        protected override void Dispose(bool disposing)
        {
            if (disposing)
            {
                if (components != null)
                {
                    components.Dispose();
                }
            }
            base.Dispose(disposing);
        }

        #region Windows Form Designer generated code
        /// <summary>
        /// Required method for Designer support - do not modify
        /// the contents of this method with the code editor.
        /// </summary>
        private void InitializeComponent()
        {
            System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(IVMiscellaneousIssue));
            this.lblCCN = new System.Windows.Forms.Label();
            this.grbSource = new System.Windows.Forms.GroupBox();
            this.txtSourceBin = new System.Windows.Forms.TextBox();
            this.btnSourceBin = new System.Windows.Forms.Button();
            this.txtSourceLoc = new System.Windows.Forms.TextBox();
            this.btnSourceLoc = new System.Windows.Forms.Button();
            this.txtSourceMasLoc = new System.Windows.Forms.TextBox();
            this.btnSourceMasLoc = new System.Windows.Forms.Button();
            this.lblSourceLoc = new System.Windows.Forms.Label();
            this.lblSourceMasLoc = new System.Windows.Forms.Label();
            this.lblSourceBin = new System.Windows.Forms.Label();
            this.btnRequireMaterialNo = new System.Windows.Forms.Button();
            this.lblRequireMaterialNo = new System.Windows.Forms.Label();
            this.btnFGoodsCode = new System.Windows.Forms.Button();
            this.txtFGoodsCode = new System.Windows.Forms.TextBox();
            this.txtRequireMaterialNo = new System.Windows.Forms.TextBox();
            this.lblFGoodsCode = new System.Windows.Forms.Label();
            this.btnInvoice = new System.Windows.Forms.Button();
            this.txtInvoice = new System.Windows.Forms.TextBox();
            this.lblInvoice = new System.Windows.Forms.Label();
            this.lblPostDate = new System.Windows.Forms.Label();
            this.btnClose = new System.Windows.Forms.Button();
            this.btnHelp = new System.Windows.Forms.Button();
            this.lblComment = new System.Windows.Forms.Label();
            this.txtComment = new System.Windows.Forms.TextBox();
            this.dgrdData = new C1.Win.C1TrueDBGrid.C1TrueDBGrid();
            this.txtTransNo = new System.Windows.Forms.TextBox();
            this.btnTransNo = new System.Windows.Forms.Button();
            this.lblTransNo = new System.Windows.Forms.Label();
            this.grbDestination = new System.Windows.Forms.GroupBox();
            this.btnPartyName = new System.Windows.Forms.Button();
            this.txtPartyName = new System.Windows.Forms.TextBox();
            this.txtDestLoc = new System.Windows.Forms.TextBox();
            this.btnDestLoc = new System.Windows.Forms.Button();
            this.txtDestMasLoc = new System.Windows.Forms.TextBox();
            this.btnDestMasLoc = new System.Windows.Forms.Button();
            this.lblDestLoc = new System.Windows.Forms.Label();
            this.lblDestMasLoc = new System.Windows.Forms.Label();
            this.lblDestBin = new System.Windows.Forms.Label();
            this.btnDestBin = new System.Windows.Forms.Button();
            this.txtDestBin = new System.Windows.Forms.TextBox();
            this.lblParty = new System.Windows.Forms.Label();
            this.btnParty = new System.Windows.Forms.Button();
            this.txtParty = new System.Windows.Forms.TextBox();
            this.btnAdd = new System.Windows.Forms.Button();
            this.btnSave = new System.Windows.Forms.Button();
            this.btnPrint = new System.Windows.Forms.Button();
            this.dtmPostDate = new C1.Win.C1Input.C1DateEdit();
            this.cboCCN = new C1.Win.C1List.C1Combo();
            this.txtPurpose = new System.Windows.Forms.TextBox();
            this.btnPurpose = new System.Windows.Forms.Button();
            this.lblPurpose = new System.Windows.Forms.Label();
            this.btnDelete = new System.Windows.Forms.Button();
            this.grbSource.SuspendLayout();
            ((System.ComponentModel.ISupportInitialize)(this.dgrdData)).BeginInit();
            this.grbDestination.SuspendLayout();
            ((System.ComponentModel.ISupportInitialize)(this.dtmPostDate)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.cboCCN)).BeginInit();
            this.SuspendLayout();
            // 
            // lblCCN
            // 
            this.lblCCN.AccessibleDescription = resources.GetString("lblCCN.AccessibleDescription");
            this.lblCCN.AccessibleName = resources.GetString("lblCCN.AccessibleName");
            this.lblCCN.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("lblCCN.Anchor")));
            this.lblCCN.AutoSize = ((bool)(resources.GetObject("lblCCN.AutoSize")));
            this.lblCCN.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("lblCCN.Dock")));
            this.lblCCN.Enabled = ((bool)(resources.GetObject("lblCCN.Enabled")));
            this.lblCCN.Font = ((System.Drawing.Font)(resources.GetObject("lblCCN.Font")));
            this.lblCCN.ForeColor = System.Drawing.Color.Maroon;
            this.lblCCN.Image = ((System.Drawing.Image)(resources.GetObject("lblCCN.Image")));
            this.lblCCN.ImageAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("lblCCN.ImageAlign")));
            this.lblCCN.ImageIndex = ((int)(resources.GetObject("lblCCN.ImageIndex")));
            this.lblCCN.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("lblCCN.ImeMode")));
            this.lblCCN.Location = ((System.Drawing.Point)(resources.GetObject("lblCCN.Location")));
            this.lblCCN.Name = "lblCCN";
            this.lblCCN.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("lblCCN.RightToLeft")));
            this.lblCCN.Size = ((System.Drawing.Size)(resources.GetObject("lblCCN.Size")));
            this.lblCCN.TabIndex = ((int)(resources.GetObject("lblCCN.TabIndex")));
            this.lblCCN.Text = resources.GetString("lblCCN.Text");
            this.lblCCN.TextAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("lblCCN.TextAlign")));
            this.lblCCN.Visible = ((bool)(resources.GetObject("lblCCN.Visible")));
            // 
            // grbSource
            // 
            this.grbSource.AccessibleDescription = resources.GetString("grbSource.AccessibleDescription");
            this.grbSource.AccessibleName = resources.GetString("grbSource.AccessibleName");
            this.grbSource.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("grbSource.Anchor")));
            this.grbSource.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("grbSource.BackgroundImage")));
            this.grbSource.Controls.Add(this.txtSourceBin);
            this.grbSource.Controls.Add(this.btnSourceBin);
            this.grbSource.Controls.Add(this.txtSourceLoc);
            this.grbSource.Controls.Add(this.btnSourceLoc);
            this.grbSource.Controls.Add(this.txtSourceMasLoc);
            this.grbSource.Controls.Add(this.btnSourceMasLoc);
            this.grbSource.Controls.Add(this.lblSourceLoc);
            this.grbSource.Controls.Add(this.lblSourceMasLoc);
            this.grbSource.Controls.Add(this.lblSourceBin);
            this.grbSource.Controls.Add(this.btnRequireMaterialNo);
            this.grbSource.Controls.Add(this.lblRequireMaterialNo);
            this.grbSource.Controls.Add(this.btnFGoodsCode);
            this.grbSource.Controls.Add(this.txtFGoodsCode);
            this.grbSource.Controls.Add(this.txtRequireMaterialNo);
            this.grbSource.Controls.Add(this.lblFGoodsCode);
            this.grbSource.Controls.Add(this.btnInvoice);
            this.grbSource.Controls.Add(this.txtInvoice);
            this.grbSource.Controls.Add(this.lblInvoice);
            this.grbSource.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("grbSource.Dock")));
            this.grbSource.Enabled = ((bool)(resources.GetObject("grbSource.Enabled")));
            this.grbSource.Font = ((System.Drawing.Font)(resources.GetObject("grbSource.Font")));
            this.grbSource.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("grbSource.ImeMode")));
            this.grbSource.Location = ((System.Drawing.Point)(resources.GetObject("grbSource.Location")));
            this.grbSource.Name = "grbSource";
            this.grbSource.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("grbSource.RightToLeft")));
            this.grbSource.Size = ((System.Drawing.Size)(resources.GetObject("grbSource.Size")));
            this.grbSource.TabIndex = ((int)(resources.GetObject("grbSource.TabIndex")));
            this.grbSource.TabStop = false;
            this.grbSource.Text = resources.GetString("grbSource.Text");
            this.grbSource.Visible = ((bool)(resources.GetObject("grbSource.Visible")));
            // 
            // txtSourceBin
            // 
            this.txtSourceBin.AccessibleDescription = resources.GetString("txtSourceBin.AccessibleDescription");
            this.txtSourceBin.AccessibleName = resources.GetString("txtSourceBin.AccessibleName");
            this.txtSourceBin.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("txtSourceBin.Anchor")));
            this.txtSourceBin.AutoSize = ((bool)(resources.GetObject("txtSourceBin.AutoSize")));
            this.txtSourceBin.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("txtSourceBin.BackgroundImage")));
            this.txtSourceBin.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("txtSourceBin.Dock")));
            this.txtSourceBin.Enabled = ((bool)(resources.GetObject("txtSourceBin.Enabled")));
            this.txtSourceBin.Font = ((System.Drawing.Font)(resources.GetObject("txtSourceBin.Font")));
            this.txtSourceBin.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("txtSourceBin.ImeMode")));
            this.txtSourceBin.Location = ((System.Drawing.Point)(resources.GetObject("txtSourceBin.Location")));
            this.txtSourceBin.MaxLength = ((int)(resources.GetObject("txtSourceBin.MaxLength")));
            this.txtSourceBin.Multiline = ((bool)(resources.GetObject("txtSourceBin.Multiline")));
            this.txtSourceBin.Name = "txtSourceBin";
            this.txtSourceBin.PasswordChar = ((char)(resources.GetObject("txtSourceBin.PasswordChar")));
            this.txtSourceBin.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("txtSourceBin.RightToLeft")));
            this.txtSourceBin.ScrollBars = ((System.Windows.Forms.ScrollBars)(resources.GetObject("txtSourceBin.ScrollBars")));
            this.txtSourceBin.Size = ((System.Drawing.Size)(resources.GetObject("txtSourceBin.Size")));
            this.txtSourceBin.TabIndex = ((int)(resources.GetObject("txtSourceBin.TabIndex")));
            this.txtSourceBin.Text = resources.GetString("txtSourceBin.Text");
            this.txtSourceBin.TextAlign = ((System.Windows.Forms.HorizontalAlignment)(resources.GetObject("txtSourceBin.TextAlign")));
            this.txtSourceBin.Visible = ((bool)(resources.GetObject("txtSourceBin.Visible")));
            this.txtSourceBin.WordWrap = ((bool)(resources.GetObject("txtSourceBin.WordWrap")));
            this.txtSourceBin.KeyDown += new System.Windows.Forms.KeyEventHandler(this.txtSourceBin_KeyDown);
            this.txtSourceBin.Validating += new System.ComponentModel.CancelEventHandler(this.txtSourceBin_Validating);
            // 
            // btnSourceBin
            // 
            this.btnSourceBin.AccessibleDescription = resources.GetString("btnSourceBin.AccessibleDescription");
            this.btnSourceBin.AccessibleName = resources.GetString("btnSourceBin.AccessibleName");
            this.btnSourceBin.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("btnSourceBin.Anchor")));
            this.btnSourceBin.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("btnSourceBin.BackgroundImage")));
            this.btnSourceBin.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("btnSourceBin.Dock")));
            this.btnSourceBin.Enabled = ((bool)(resources.GetObject("btnSourceBin.Enabled")));
            this.btnSourceBin.FlatStyle = ((System.Windows.Forms.FlatStyle)(resources.GetObject("btnSourceBin.FlatStyle")));
            this.btnSourceBin.Font = ((System.Drawing.Font)(resources.GetObject("btnSourceBin.Font")));
            this.btnSourceBin.Image = ((System.Drawing.Image)(resources.GetObject("btnSourceBin.Image")));
            this.btnSourceBin.ImageAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("btnSourceBin.ImageAlign")));
            this.btnSourceBin.ImageIndex = ((int)(resources.GetObject("btnSourceBin.ImageIndex")));
            this.btnSourceBin.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("btnSourceBin.ImeMode")));
            this.btnSourceBin.Location = ((System.Drawing.Point)(resources.GetObject("btnSourceBin.Location")));
            this.btnSourceBin.Name = "btnSourceBin";
            this.btnSourceBin.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("btnSourceBin.RightToLeft")));
            this.btnSourceBin.Size = ((System.Drawing.Size)(resources.GetObject("btnSourceBin.Size")));
            this.btnSourceBin.TabIndex = ((int)(resources.GetObject("btnSourceBin.TabIndex")));
            this.btnSourceBin.Text = resources.GetString("btnSourceBin.Text");
            this.btnSourceBin.TextAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("btnSourceBin.TextAlign")));
            this.btnSourceBin.Visible = ((bool)(resources.GetObject("btnSourceBin.Visible")));
            this.btnSourceBin.Click += new System.EventHandler(this.btnSourceBin_Click);
            // 
            // txtSourceLoc
            // 
            this.txtSourceLoc.AccessibleDescription = resources.GetString("txtSourceLoc.AccessibleDescription");
            this.txtSourceLoc.AccessibleName = resources.GetString("txtSourceLoc.AccessibleName");
            this.txtSourceLoc.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("txtSourceLoc.Anchor")));
            this.txtSourceLoc.AutoSize = ((bool)(resources.GetObject("txtSourceLoc.AutoSize")));
            this.txtSourceLoc.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("txtSourceLoc.BackgroundImage")));
            this.txtSourceLoc.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("txtSourceLoc.Dock")));
            this.txtSourceLoc.Enabled = ((bool)(resources.GetObject("txtSourceLoc.Enabled")));
            this.txtSourceLoc.Font = ((System.Drawing.Font)(resources.GetObject("txtSourceLoc.Font")));
            this.txtSourceLoc.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("txtSourceLoc.ImeMode")));
            this.txtSourceLoc.Location = ((System.Drawing.Point)(resources.GetObject("txtSourceLoc.Location")));
            this.txtSourceLoc.MaxLength = ((int)(resources.GetObject("txtSourceLoc.MaxLength")));
            this.txtSourceLoc.Multiline = ((bool)(resources.GetObject("txtSourceLoc.Multiline")));
            this.txtSourceLoc.Name = "txtSourceLoc";
            this.txtSourceLoc.PasswordChar = ((char)(resources.GetObject("txtSourceLoc.PasswordChar")));
            this.txtSourceLoc.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("txtSourceLoc.RightToLeft")));
            this.txtSourceLoc.ScrollBars = ((System.Windows.Forms.ScrollBars)(resources.GetObject("txtSourceLoc.ScrollBars")));
            this.txtSourceLoc.Size = ((System.Drawing.Size)(resources.GetObject("txtSourceLoc.Size")));
            this.txtSourceLoc.TabIndex = ((int)(resources.GetObject("txtSourceLoc.TabIndex")));
            this.txtSourceLoc.Text = resources.GetString("txtSourceLoc.Text");
            this.txtSourceLoc.TextAlign = ((System.Windows.Forms.HorizontalAlignment)(resources.GetObject("txtSourceLoc.TextAlign")));
            this.txtSourceLoc.Visible = ((bool)(resources.GetObject("txtSourceLoc.Visible")));
            this.txtSourceLoc.WordWrap = ((bool)(resources.GetObject("txtSourceLoc.WordWrap")));
            this.txtSourceLoc.KeyDown += new System.Windows.Forms.KeyEventHandler(this.txtSourceLoc_KeyDown);
            this.txtSourceLoc.Validating += new System.ComponentModel.CancelEventHandler(this.txtSourceLoc_Validating);
            // 
            // btnSourceLoc
            // 
            this.btnSourceLoc.AccessibleDescription = resources.GetString("btnSourceLoc.AccessibleDescription");
            this.btnSourceLoc.AccessibleName = resources.GetString("btnSourceLoc.AccessibleName");
            this.btnSourceLoc.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("btnSourceLoc.Anchor")));
            this.btnSourceLoc.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("btnSourceLoc.BackgroundImage")));
            this.btnSourceLoc.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("btnSourceLoc.Dock")));
            this.btnSourceLoc.Enabled = ((bool)(resources.GetObject("btnSourceLoc.Enabled")));
            this.btnSourceLoc.FlatStyle = ((System.Windows.Forms.FlatStyle)(resources.GetObject("btnSourceLoc.FlatStyle")));
            this.btnSourceLoc.Font = ((System.Drawing.Font)(resources.GetObject("btnSourceLoc.Font")));
            this.btnSourceLoc.Image = ((System.Drawing.Image)(resources.GetObject("btnSourceLoc.Image")));
            this.btnSourceLoc.ImageAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("btnSourceLoc.ImageAlign")));
            this.btnSourceLoc.ImageIndex = ((int)(resources.GetObject("btnSourceLoc.ImageIndex")));
            this.btnSourceLoc.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("btnSourceLoc.ImeMode")));
            this.btnSourceLoc.Location = ((System.Drawing.Point)(resources.GetObject("btnSourceLoc.Location")));
            this.btnSourceLoc.Name = "btnSourceLoc";
            this.btnSourceLoc.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("btnSourceLoc.RightToLeft")));
            this.btnSourceLoc.Size = ((System.Drawing.Size)(resources.GetObject("btnSourceLoc.Size")));
            this.btnSourceLoc.TabIndex = ((int)(resources.GetObject("btnSourceLoc.TabIndex")));
            this.btnSourceLoc.Text = resources.GetString("btnSourceLoc.Text");
            this.btnSourceLoc.TextAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("btnSourceLoc.TextAlign")));
            this.btnSourceLoc.Visible = ((bool)(resources.GetObject("btnSourceLoc.Visible")));
            this.btnSourceLoc.Click += new System.EventHandler(this.btnSourceLoc_Click);
            // 
            // txtSourceMasLoc
            // 
            this.txtSourceMasLoc.AccessibleDescription = resources.GetString("txtSourceMasLoc.AccessibleDescription");
            this.txtSourceMasLoc.AccessibleName = resources.GetString("txtSourceMasLoc.AccessibleName");
            this.txtSourceMasLoc.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("txtSourceMasLoc.Anchor")));
            this.txtSourceMasLoc.AutoSize = ((bool)(resources.GetObject("txtSourceMasLoc.AutoSize")));
            this.txtSourceMasLoc.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("txtSourceMasLoc.BackgroundImage")));
            this.txtSourceMasLoc.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("txtSourceMasLoc.Dock")));
            this.txtSourceMasLoc.Enabled = ((bool)(resources.GetObject("txtSourceMasLoc.Enabled")));
            this.txtSourceMasLoc.Font = ((System.Drawing.Font)(resources.GetObject("txtSourceMasLoc.Font")));
            this.txtSourceMasLoc.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("txtSourceMasLoc.ImeMode")));
            this.txtSourceMasLoc.Location = ((System.Drawing.Point)(resources.GetObject("txtSourceMasLoc.Location")));
            this.txtSourceMasLoc.MaxLength = ((int)(resources.GetObject("txtSourceMasLoc.MaxLength")));
            this.txtSourceMasLoc.Multiline = ((bool)(resources.GetObject("txtSourceMasLoc.Multiline")));
            this.txtSourceMasLoc.Name = "txtSourceMasLoc";
            this.txtSourceMasLoc.PasswordChar = ((char)(resources.GetObject("txtSourceMasLoc.PasswordChar")));
            this.txtSourceMasLoc.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("txtSourceMasLoc.RightToLeft")));
            this.txtSourceMasLoc.ScrollBars = ((System.Windows.Forms.ScrollBars)(resources.GetObject("txtSourceMasLoc.ScrollBars")));
            this.txtSourceMasLoc.Size = ((System.Drawing.Size)(resources.GetObject("txtSourceMasLoc.Size")));
            this.txtSourceMasLoc.TabIndex = ((int)(resources.GetObject("txtSourceMasLoc.TabIndex")));
            this.txtSourceMasLoc.Text = resources.GetString("txtSourceMasLoc.Text");
            this.txtSourceMasLoc.TextAlign = ((System.Windows.Forms.HorizontalAlignment)(resources.GetObject("txtSourceMasLoc.TextAlign")));
            this.txtSourceMasLoc.Visible = ((bool)(resources.GetObject("txtSourceMasLoc.Visible")));
            this.txtSourceMasLoc.WordWrap = ((bool)(resources.GetObject("txtSourceMasLoc.WordWrap")));
            this.txtSourceMasLoc.KeyDown += new System.Windows.Forms.KeyEventHandler(this.txtSourceMasLoc_KeyDown);
            this.txtSourceMasLoc.Validating += new System.ComponentModel.CancelEventHandler(this.txtSourceMasLoc_Validating);
            // 
            // btnSourceMasLoc
            // 
            this.btnSourceMasLoc.AccessibleDescription = resources.GetString("btnSourceMasLoc.AccessibleDescription");
            this.btnSourceMasLoc.AccessibleName = resources.GetString("btnSourceMasLoc.AccessibleName");
            this.btnSourceMasLoc.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("btnSourceMasLoc.Anchor")));
            this.btnSourceMasLoc.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("btnSourceMasLoc.BackgroundImage")));
            this.btnSourceMasLoc.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("btnSourceMasLoc.Dock")));
            this.btnSourceMasLoc.Enabled = ((bool)(resources.GetObject("btnSourceMasLoc.Enabled")));
            this.btnSourceMasLoc.FlatStyle = ((System.Windows.Forms.FlatStyle)(resources.GetObject("btnSourceMasLoc.FlatStyle")));
            this.btnSourceMasLoc.Font = ((System.Drawing.Font)(resources.GetObject("btnSourceMasLoc.Font")));
            this.btnSourceMasLoc.Image = ((System.Drawing.Image)(resources.GetObject("btnSourceMasLoc.Image")));
            this.btnSourceMasLoc.ImageAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("btnSourceMasLoc.ImageAlign")));
            this.btnSourceMasLoc.ImageIndex = ((int)(resources.GetObject("btnSourceMasLoc.ImageIndex")));
            this.btnSourceMasLoc.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("btnSourceMasLoc.ImeMode")));
            this.btnSourceMasLoc.Location = ((System.Drawing.Point)(resources.GetObject("btnSourceMasLoc.Location")));
            this.btnSourceMasLoc.Name = "btnSourceMasLoc";
            this.btnSourceMasLoc.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("btnSourceMasLoc.RightToLeft")));
            this.btnSourceMasLoc.Size = ((System.Drawing.Size)(resources.GetObject("btnSourceMasLoc.Size")));
            this.btnSourceMasLoc.TabIndex = ((int)(resources.GetObject("btnSourceMasLoc.TabIndex")));
            this.btnSourceMasLoc.Text = resources.GetString("btnSourceMasLoc.Text");
            this.btnSourceMasLoc.TextAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("btnSourceMasLoc.TextAlign")));
            this.btnSourceMasLoc.Visible = ((bool)(resources.GetObject("btnSourceMasLoc.Visible")));
            this.btnSourceMasLoc.Click += new System.EventHandler(this.btnSourceMasLoc_Click);
            // 
            // lblSourceLoc
            // 
            this.lblSourceLoc.AccessibleDescription = resources.GetString("lblSourceLoc.AccessibleDescription");
            this.lblSourceLoc.AccessibleName = resources.GetString("lblSourceLoc.AccessibleName");
            this.lblSourceLoc.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("lblSourceLoc.Anchor")));
            this.lblSourceLoc.AutoSize = ((bool)(resources.GetObject("lblSourceLoc.AutoSize")));
            this.lblSourceLoc.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("lblSourceLoc.Dock")));
            this.lblSourceLoc.Enabled = ((bool)(resources.GetObject("lblSourceLoc.Enabled")));
            this.lblSourceLoc.Font = ((System.Drawing.Font)(resources.GetObject("lblSourceLoc.Font")));
            this.lblSourceLoc.ForeColor = System.Drawing.Color.Maroon;
            this.lblSourceLoc.Image = ((System.Drawing.Image)(resources.GetObject("lblSourceLoc.Image")));
            this.lblSourceLoc.ImageAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("lblSourceLoc.ImageAlign")));
            this.lblSourceLoc.ImageIndex = ((int)(resources.GetObject("lblSourceLoc.ImageIndex")));
            this.lblSourceLoc.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("lblSourceLoc.ImeMode")));
            this.lblSourceLoc.Location = ((System.Drawing.Point)(resources.GetObject("lblSourceLoc.Location")));
            this.lblSourceLoc.Name = "lblSourceLoc";
            this.lblSourceLoc.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("lblSourceLoc.RightToLeft")));
            this.lblSourceLoc.Size = ((System.Drawing.Size)(resources.GetObject("lblSourceLoc.Size")));
            this.lblSourceLoc.TabIndex = ((int)(resources.GetObject("lblSourceLoc.TabIndex")));
            this.lblSourceLoc.Text = resources.GetString("lblSourceLoc.Text");
            this.lblSourceLoc.TextAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("lblSourceLoc.TextAlign")));
            this.lblSourceLoc.Visible = ((bool)(resources.GetObject("lblSourceLoc.Visible")));
            // 
            // lblSourceMasLoc
            // 
            this.lblSourceMasLoc.AccessibleDescription = resources.GetString("lblSourceMasLoc.AccessibleDescription");
            this.lblSourceMasLoc.AccessibleName = resources.GetString("lblSourceMasLoc.AccessibleName");
            this.lblSourceMasLoc.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("lblSourceMasLoc.Anchor")));
            this.lblSourceMasLoc.AutoSize = ((bool)(resources.GetObject("lblSourceMasLoc.AutoSize")));
            this.lblSourceMasLoc.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("lblSourceMasLoc.Dock")));
            this.lblSourceMasLoc.Enabled = ((bool)(resources.GetObject("lblSourceMasLoc.Enabled")));
            this.lblSourceMasLoc.Font = ((System.Drawing.Font)(resources.GetObject("lblSourceMasLoc.Font")));
            this.lblSourceMasLoc.ForeColor = System.Drawing.Color.Maroon;
            this.lblSourceMasLoc.Image = ((System.Drawing.Image)(resources.GetObject("lblSourceMasLoc.Image")));
            this.lblSourceMasLoc.ImageAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("lblSourceMasLoc.ImageAlign")));
            this.lblSourceMasLoc.ImageIndex = ((int)(resources.GetObject("lblSourceMasLoc.ImageIndex")));
            this.lblSourceMasLoc.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("lblSourceMasLoc.ImeMode")));
            this.lblSourceMasLoc.Location = ((System.Drawing.Point)(resources.GetObject("lblSourceMasLoc.Location")));
            this.lblSourceMasLoc.Name = "lblSourceMasLoc";
            this.lblSourceMasLoc.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("lblSourceMasLoc.RightToLeft")));
            this.lblSourceMasLoc.Size = ((System.Drawing.Size)(resources.GetObject("lblSourceMasLoc.Size")));
            this.lblSourceMasLoc.TabIndex = ((int)(resources.GetObject("lblSourceMasLoc.TabIndex")));
            this.lblSourceMasLoc.Text = resources.GetString("lblSourceMasLoc.Text");
            this.lblSourceMasLoc.TextAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("lblSourceMasLoc.TextAlign")));
            this.lblSourceMasLoc.Visible = ((bool)(resources.GetObject("lblSourceMasLoc.Visible")));
            // 
            // lblSourceBin
            // 
            this.lblSourceBin.AccessibleDescription = resources.GetString("lblSourceBin.AccessibleDescription");
            this.lblSourceBin.AccessibleName = resources.GetString("lblSourceBin.AccessibleName");
            this.lblSourceBin.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("lblSourceBin.Anchor")));
            this.lblSourceBin.AutoSize = ((bool)(resources.GetObject("lblSourceBin.AutoSize")));
            this.lblSourceBin.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("lblSourceBin.Dock")));
            this.lblSourceBin.Enabled = ((bool)(resources.GetObject("lblSourceBin.Enabled")));
            this.lblSourceBin.Font = ((System.Drawing.Font)(resources.GetObject("lblSourceBin.Font")));
            this.lblSourceBin.Image = ((System.Drawing.Image)(resources.GetObject("lblSourceBin.Image")));
            this.lblSourceBin.ImageAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("lblSourceBin.ImageAlign")));
            this.lblSourceBin.ImageIndex = ((int)(resources.GetObject("lblSourceBin.ImageIndex")));
            this.lblSourceBin.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("lblSourceBin.ImeMode")));
            this.lblSourceBin.Location = ((System.Drawing.Point)(resources.GetObject("lblSourceBin.Location")));
            this.lblSourceBin.Name = "lblSourceBin";
            this.lblSourceBin.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("lblSourceBin.RightToLeft")));
            this.lblSourceBin.Size = ((System.Drawing.Size)(resources.GetObject("lblSourceBin.Size")));
            this.lblSourceBin.TabIndex = ((int)(resources.GetObject("lblSourceBin.TabIndex")));
            this.lblSourceBin.Text = resources.GetString("lblSourceBin.Text");
            this.lblSourceBin.TextAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("lblSourceBin.TextAlign")));
            this.lblSourceBin.Visible = ((bool)(resources.GetObject("lblSourceBin.Visible")));
            // 
            // btnRequireMaterialNo
            // 
            this.btnRequireMaterialNo.AccessibleDescription = resources.GetString("btnRequireMaterialNo.AccessibleDescription");
            this.btnRequireMaterialNo.AccessibleName = resources.GetString("btnRequireMaterialNo.AccessibleName");
            this.btnRequireMaterialNo.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("btnRequireMaterialNo.Anchor")));
            this.btnRequireMaterialNo.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("btnRequireMaterialNo.BackgroundImage")));
            this.btnRequireMaterialNo.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("btnRequireMaterialNo.Dock")));
            this.btnRequireMaterialNo.Enabled = ((bool)(resources.GetObject("btnRequireMaterialNo.Enabled")));
            this.btnRequireMaterialNo.FlatStyle = ((System.Windows.Forms.FlatStyle)(resources.GetObject("btnRequireMaterialNo.FlatStyle")));
            this.btnRequireMaterialNo.Font = ((System.Drawing.Font)(resources.GetObject("btnRequireMaterialNo.Font")));
            this.btnRequireMaterialNo.Image = ((System.Drawing.Image)(resources.GetObject("btnRequireMaterialNo.Image")));
            this.btnRequireMaterialNo.ImageAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("btnRequireMaterialNo.ImageAlign")));
            this.btnRequireMaterialNo.ImageIndex = ((int)(resources.GetObject("btnRequireMaterialNo.ImageIndex")));
            this.btnRequireMaterialNo.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("btnRequireMaterialNo.ImeMode")));
            this.btnRequireMaterialNo.Location = ((System.Drawing.Point)(resources.GetObject("btnRequireMaterialNo.Location")));
            this.btnRequireMaterialNo.Name = "btnRequireMaterialNo";
            this.btnRequireMaterialNo.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("btnRequireMaterialNo.RightToLeft")));
            this.btnRequireMaterialNo.Size = ((System.Drawing.Size)(resources.GetObject("btnRequireMaterialNo.Size")));
            this.btnRequireMaterialNo.TabIndex = ((int)(resources.GetObject("btnRequireMaterialNo.TabIndex")));
            this.btnRequireMaterialNo.Text = resources.GetString("btnRequireMaterialNo.Text");
            this.btnRequireMaterialNo.TextAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("btnRequireMaterialNo.TextAlign")));
            this.btnRequireMaterialNo.Visible = ((bool)(resources.GetObject("btnRequireMaterialNo.Visible")));
            this.btnRequireMaterialNo.Click += new System.EventHandler(this.btnRequireMaterialNo_Click);
            // 
            // lblRequireMaterialNo
            // 
            this.lblRequireMaterialNo.AccessibleDescription = resources.GetString("lblRequireMaterialNo.AccessibleDescription");
            this.lblRequireMaterialNo.AccessibleName = resources.GetString("lblRequireMaterialNo.AccessibleName");
            this.lblRequireMaterialNo.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("lblRequireMaterialNo.Anchor")));
            this.lblRequireMaterialNo.AutoSize = ((bool)(resources.GetObject("lblRequireMaterialNo.AutoSize")));
            this.lblRequireMaterialNo.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("lblRequireMaterialNo.Dock")));
            this.lblRequireMaterialNo.Enabled = ((bool)(resources.GetObject("lblRequireMaterialNo.Enabled")));
            this.lblRequireMaterialNo.Font = ((System.Drawing.Font)(resources.GetObject("lblRequireMaterialNo.Font")));
            this.lblRequireMaterialNo.Image = ((System.Drawing.Image)(resources.GetObject("lblRequireMaterialNo.Image")));
            this.lblRequireMaterialNo.ImageAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("lblRequireMaterialNo.ImageAlign")));
            this.lblRequireMaterialNo.ImageIndex = ((int)(resources.GetObject("lblRequireMaterialNo.ImageIndex")));
            this.lblRequireMaterialNo.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("lblRequireMaterialNo.ImeMode")));
            this.lblRequireMaterialNo.Location = ((System.Drawing.Point)(resources.GetObject("lblRequireMaterialNo.Location")));
            this.lblRequireMaterialNo.Name = "lblRequireMaterialNo";
            this.lblRequireMaterialNo.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("lblRequireMaterialNo.RightToLeft")));
            this.lblRequireMaterialNo.Size = ((System.Drawing.Size)(resources.GetObject("lblRequireMaterialNo.Size")));
            this.lblRequireMaterialNo.TabIndex = ((int)(resources.GetObject("lblRequireMaterialNo.TabIndex")));
            this.lblRequireMaterialNo.Tag = "0";
            this.lblRequireMaterialNo.Text = resources.GetString("lblRequireMaterialNo.Text");
            this.lblRequireMaterialNo.TextAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("lblRequireMaterialNo.TextAlign")));
            this.lblRequireMaterialNo.Visible = ((bool)(resources.GetObject("lblRequireMaterialNo.Visible")));
            // 
            // btnFGoodsCode
            // 
            this.btnFGoodsCode.AccessibleDescription = resources.GetString("btnFGoodsCode.AccessibleDescription");
            this.btnFGoodsCode.AccessibleName = resources.GetString("btnFGoodsCode.AccessibleName");
            this.btnFGoodsCode.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("btnFGoodsCode.Anchor")));
            this.btnFGoodsCode.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("btnFGoodsCode.BackgroundImage")));
            this.btnFGoodsCode.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("btnFGoodsCode.Dock")));
            this.btnFGoodsCode.Enabled = ((bool)(resources.GetObject("btnFGoodsCode.Enabled")));
            this.btnFGoodsCode.FlatStyle = ((System.Windows.Forms.FlatStyle)(resources.GetObject("btnFGoodsCode.FlatStyle")));
            this.btnFGoodsCode.Font = ((System.Drawing.Font)(resources.GetObject("btnFGoodsCode.Font")));
            this.btnFGoodsCode.Image = ((System.Drawing.Image)(resources.GetObject("btnFGoodsCode.Image")));
            this.btnFGoodsCode.ImageAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("btnFGoodsCode.ImageAlign")));
            this.btnFGoodsCode.ImageIndex = ((int)(resources.GetObject("btnFGoodsCode.ImageIndex")));
            this.btnFGoodsCode.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("btnFGoodsCode.ImeMode")));
            this.btnFGoodsCode.Location = ((System.Drawing.Point)(resources.GetObject("btnFGoodsCode.Location")));
            this.btnFGoodsCode.Name = "btnFGoodsCode";
            this.btnFGoodsCode.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("btnFGoodsCode.RightToLeft")));
            this.btnFGoodsCode.Size = ((System.Drawing.Size)(resources.GetObject("btnFGoodsCode.Size")));
            this.btnFGoodsCode.TabIndex = ((int)(resources.GetObject("btnFGoodsCode.TabIndex")));
            this.btnFGoodsCode.Text = resources.GetString("btnFGoodsCode.Text");
            this.btnFGoodsCode.TextAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("btnFGoodsCode.TextAlign")));
            this.btnFGoodsCode.Visible = ((bool)(resources.GetObject("btnFGoodsCode.Visible")));
            this.btnFGoodsCode.Click += new System.EventHandler(this.btnFGoodsCode_Click);
            // 
            // txtFGoodsCode
            // 
            this.txtFGoodsCode.AccessibleDescription = resources.GetString("txtFGoodsCode.AccessibleDescription");
            this.txtFGoodsCode.AccessibleName = resources.GetString("txtFGoodsCode.AccessibleName");
            this.txtFGoodsCode.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("txtFGoodsCode.Anchor")));
            this.txtFGoodsCode.AutoSize = ((bool)(resources.GetObject("txtFGoodsCode.AutoSize")));
            this.txtFGoodsCode.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("txtFGoodsCode.BackgroundImage")));
            this.txtFGoodsCode.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("txtFGoodsCode.Dock")));
            this.txtFGoodsCode.Enabled = ((bool)(resources.GetObject("txtFGoodsCode.Enabled")));
            this.txtFGoodsCode.Font = ((System.Drawing.Font)(resources.GetObject("txtFGoodsCode.Font")));
            this.txtFGoodsCode.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("txtFGoodsCode.ImeMode")));
            this.txtFGoodsCode.Location = ((System.Drawing.Point)(resources.GetObject("txtFGoodsCode.Location")));
            this.txtFGoodsCode.MaxLength = ((int)(resources.GetObject("txtFGoodsCode.MaxLength")));
            this.txtFGoodsCode.Multiline = ((bool)(resources.GetObject("txtFGoodsCode.Multiline")));
            this.txtFGoodsCode.Name = "txtFGoodsCode";
            this.txtFGoodsCode.PasswordChar = ((char)(resources.GetObject("txtFGoodsCode.PasswordChar")));
            this.txtFGoodsCode.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("txtFGoodsCode.RightToLeft")));
            this.txtFGoodsCode.ScrollBars = ((System.Windows.Forms.ScrollBars)(resources.GetObject("txtFGoodsCode.ScrollBars")));
            this.txtFGoodsCode.Size = ((System.Drawing.Size)(resources.GetObject("txtFGoodsCode.Size")));
            this.txtFGoodsCode.TabIndex = ((int)(resources.GetObject("txtFGoodsCode.TabIndex")));
            this.txtFGoodsCode.Text = resources.GetString("txtFGoodsCode.Text");
            this.txtFGoodsCode.TextAlign = ((System.Windows.Forms.HorizontalAlignment)(resources.GetObject("txtFGoodsCode.TextAlign")));
            this.txtFGoodsCode.Visible = ((bool)(resources.GetObject("txtFGoodsCode.Visible")));
            this.txtFGoodsCode.WordWrap = ((bool)(resources.GetObject("txtFGoodsCode.WordWrap")));
            this.txtFGoodsCode.KeyDown += new System.Windows.Forms.KeyEventHandler(this.txtFGoodsCode_KeyDown);
            this.txtFGoodsCode.Validating += new System.ComponentModel.CancelEventHandler(this.txtFGoodsCode_Validating);
            // 
            // txtRequireMaterialNo
            // 
            this.txtRequireMaterialNo.AccessibleDescription = resources.GetString("txtRequireMaterialNo.AccessibleDescription");
            this.txtRequireMaterialNo.AccessibleName = resources.GetString("txtRequireMaterialNo.AccessibleName");
            this.txtRequireMaterialNo.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("txtRequireMaterialNo.Anchor")));
            this.txtRequireMaterialNo.AutoSize = ((bool)(resources.GetObject("txtRequireMaterialNo.AutoSize")));
            this.txtRequireMaterialNo.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("txtRequireMaterialNo.BackgroundImage")));
            this.txtRequireMaterialNo.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("txtRequireMaterialNo.Dock")));
            this.txtRequireMaterialNo.Enabled = ((bool)(resources.GetObject("txtRequireMaterialNo.Enabled")));
            this.txtRequireMaterialNo.Font = ((System.Drawing.Font)(resources.GetObject("txtRequireMaterialNo.Font")));
            this.txtRequireMaterialNo.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("txtRequireMaterialNo.ImeMode")));
            this.txtRequireMaterialNo.Location = ((System.Drawing.Point)(resources.GetObject("txtRequireMaterialNo.Location")));
            this.txtRequireMaterialNo.MaxLength = ((int)(resources.GetObject("txtRequireMaterialNo.MaxLength")));
            this.txtRequireMaterialNo.Multiline = ((bool)(resources.GetObject("txtRequireMaterialNo.Multiline")));
            this.txtRequireMaterialNo.Name = "txtRequireMaterialNo";
            this.txtRequireMaterialNo.PasswordChar = ((char)(resources.GetObject("txtRequireMaterialNo.PasswordChar")));
            this.txtRequireMaterialNo.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("txtRequireMaterialNo.RightToLeft")));
            this.txtRequireMaterialNo.ScrollBars = ((System.Windows.Forms.ScrollBars)(resources.GetObject("txtRequireMaterialNo.ScrollBars")));
            this.txtRequireMaterialNo.Size = ((System.Drawing.Size)(resources.GetObject("txtRequireMaterialNo.Size")));
            this.txtRequireMaterialNo.TabIndex = ((int)(resources.GetObject("txtRequireMaterialNo.TabIndex")));
            this.txtRequireMaterialNo.Text = resources.GetString("txtRequireMaterialNo.Text");
            this.txtRequireMaterialNo.TextAlign = ((System.Windows.Forms.HorizontalAlignment)(resources.GetObject("txtRequireMaterialNo.TextAlign")));
            this.txtRequireMaterialNo.Visible = ((bool)(resources.GetObject("txtRequireMaterialNo.Visible")));
            this.txtRequireMaterialNo.WordWrap = ((bool)(resources.GetObject("txtRequireMaterialNo.WordWrap")));
            this.txtRequireMaterialNo.KeyDown += new System.Windows.Forms.KeyEventHandler(this.txtRequireMaterialNo_KeyDown);
            this.txtRequireMaterialNo.Validating += new System.ComponentModel.CancelEventHandler(this.txtRequireMaterialNo_Validating);
            // 
            // lblFGoodsCode
            // 
            this.lblFGoodsCode.AccessibleDescription = resources.GetString("lblFGoodsCode.AccessibleDescription");
            this.lblFGoodsCode.AccessibleName = resources.GetString("lblFGoodsCode.AccessibleName");
            this.lblFGoodsCode.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("lblFGoodsCode.Anchor")));
            this.lblFGoodsCode.AutoSize = ((bool)(resources.GetObject("lblFGoodsCode.AutoSize")));
            this.lblFGoodsCode.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("lblFGoodsCode.Dock")));
            this.lblFGoodsCode.Enabled = ((bool)(resources.GetObject("lblFGoodsCode.Enabled")));
            this.lblFGoodsCode.Font = ((System.Drawing.Font)(resources.GetObject("lblFGoodsCode.Font")));
            this.lblFGoodsCode.Image = ((System.Drawing.Image)(resources.GetObject("lblFGoodsCode.Image")));
            this.lblFGoodsCode.ImageAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("lblFGoodsCode.ImageAlign")));
            this.lblFGoodsCode.ImageIndex = ((int)(resources.GetObject("lblFGoodsCode.ImageIndex")));
            this.lblFGoodsCode.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("lblFGoodsCode.ImeMode")));
            this.lblFGoodsCode.Location = ((System.Drawing.Point)(resources.GetObject("lblFGoodsCode.Location")));
            this.lblFGoodsCode.Name = "lblFGoodsCode";
            this.lblFGoodsCode.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("lblFGoodsCode.RightToLeft")));
            this.lblFGoodsCode.Size = ((System.Drawing.Size)(resources.GetObject("lblFGoodsCode.Size")));
            this.lblFGoodsCode.TabIndex = ((int)(resources.GetObject("lblFGoodsCode.TabIndex")));
            this.lblFGoodsCode.Tag = "0";
            this.lblFGoodsCode.Text = resources.GetString("lblFGoodsCode.Text");
            this.lblFGoodsCode.TextAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("lblFGoodsCode.TextAlign")));
            this.lblFGoodsCode.Visible = ((bool)(resources.GetObject("lblFGoodsCode.Visible")));
            // 
            // btnInvoice
            // 
            this.btnInvoice.AccessibleDescription = resources.GetString("btnInvoice.AccessibleDescription");
            this.btnInvoice.AccessibleName = resources.GetString("btnInvoice.AccessibleName");
            this.btnInvoice.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("btnInvoice.Anchor")));
            this.btnInvoice.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("btnInvoice.BackgroundImage")));
            this.btnInvoice.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("btnInvoice.Dock")));
            this.btnInvoice.Enabled = ((bool)(resources.GetObject("btnInvoice.Enabled")));
            this.btnInvoice.FlatStyle = ((System.Windows.Forms.FlatStyle)(resources.GetObject("btnInvoice.FlatStyle")));
            this.btnInvoice.Font = ((System.Drawing.Font)(resources.GetObject("btnInvoice.Font")));
            this.btnInvoice.Image = ((System.Drawing.Image)(resources.GetObject("btnInvoice.Image")));
            this.btnInvoice.ImageAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("btnInvoice.ImageAlign")));
            this.btnInvoice.ImageIndex = ((int)(resources.GetObject("btnInvoice.ImageIndex")));
            this.btnInvoice.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("btnInvoice.ImeMode")));
            this.btnInvoice.Location = ((System.Drawing.Point)(resources.GetObject("btnInvoice.Location")));
            this.btnInvoice.Name = "btnInvoice";
            this.btnInvoice.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("btnInvoice.RightToLeft")));
            this.btnInvoice.Size = ((System.Drawing.Size)(resources.GetObject("btnInvoice.Size")));
            this.btnInvoice.TabIndex = ((int)(resources.GetObject("btnInvoice.TabIndex")));
            this.btnInvoice.Text = resources.GetString("btnInvoice.Text");
            this.btnInvoice.TextAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("btnInvoice.TextAlign")));
            this.btnInvoice.Visible = ((bool)(resources.GetObject("btnInvoice.Visible")));
            this.btnInvoice.Click += new System.EventHandler(this.btnInvoice_Click);
            // 
            // txtInvoice
            // 
            this.txtInvoice.AccessibleDescription = resources.GetString("txtInvoice.AccessibleDescription");
            this.txtInvoice.AccessibleName = resources.GetString("txtInvoice.AccessibleName");
            this.txtInvoice.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("txtInvoice.Anchor")));
            this.txtInvoice.AutoSize = ((bool)(resources.GetObject("txtInvoice.AutoSize")));
            this.txtInvoice.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("txtInvoice.BackgroundImage")));
            this.txtInvoice.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("txtInvoice.Dock")));
            this.txtInvoice.Enabled = ((bool)(resources.GetObject("txtInvoice.Enabled")));
            this.txtInvoice.Font = ((System.Drawing.Font)(resources.GetObject("txtInvoice.Font")));
            this.txtInvoice.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("txtInvoice.ImeMode")));
            this.txtInvoice.Location = ((System.Drawing.Point)(resources.GetObject("txtInvoice.Location")));
            this.txtInvoice.MaxLength = ((int)(resources.GetObject("txtInvoice.MaxLength")));
            this.txtInvoice.Multiline = ((bool)(resources.GetObject("txtInvoice.Multiline")));
            this.txtInvoice.Name = "txtInvoice";
            this.txtInvoice.PasswordChar = ((char)(resources.GetObject("txtInvoice.PasswordChar")));
            this.txtInvoice.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("txtInvoice.RightToLeft")));
            this.txtInvoice.ScrollBars = ((System.Windows.Forms.ScrollBars)(resources.GetObject("txtInvoice.ScrollBars")));
            this.txtInvoice.Size = ((System.Drawing.Size)(resources.GetObject("txtInvoice.Size")));
            this.txtInvoice.TabIndex = ((int)(resources.GetObject("txtInvoice.TabIndex")));
            this.txtInvoice.Text = resources.GetString("txtInvoice.Text");
            this.txtInvoice.TextAlign = ((System.Windows.Forms.HorizontalAlignment)(resources.GetObject("txtInvoice.TextAlign")));
            this.txtInvoice.Visible = ((bool)(resources.GetObject("txtInvoice.Visible")));
            this.txtInvoice.WordWrap = ((bool)(resources.GetObject("txtInvoice.WordWrap")));
            this.txtInvoice.KeyDown += new System.Windows.Forms.KeyEventHandler(this.txtInvoice_KeyDown);
            this.txtInvoice.Validating += new System.ComponentModel.CancelEventHandler(this.txtInvoice_Validating);
            // 
            // lblInvoice
            // 
            this.lblInvoice.AccessibleDescription = resources.GetString("lblInvoice.AccessibleDescription");
            this.lblInvoice.AccessibleName = resources.GetString("lblInvoice.AccessibleName");
            this.lblInvoice.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("lblInvoice.Anchor")));
            this.lblInvoice.AutoSize = ((bool)(resources.GetObject("lblInvoice.AutoSize")));
            this.lblInvoice.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("lblInvoice.Dock")));
            this.lblInvoice.Enabled = ((bool)(resources.GetObject("lblInvoice.Enabled")));
            this.lblInvoice.Font = ((System.Drawing.Font)(resources.GetObject("lblInvoice.Font")));
            this.lblInvoice.Image = ((System.Drawing.Image)(resources.GetObject("lblInvoice.Image")));
            this.lblInvoice.ImageAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("lblInvoice.ImageAlign")));
            this.lblInvoice.ImageIndex = ((int)(resources.GetObject("lblInvoice.ImageIndex")));
            this.lblInvoice.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("lblInvoice.ImeMode")));
            this.lblInvoice.Location = ((System.Drawing.Point)(resources.GetObject("lblInvoice.Location")));
            this.lblInvoice.Name = "lblInvoice";
            this.lblInvoice.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("lblInvoice.RightToLeft")));
            this.lblInvoice.Size = ((System.Drawing.Size)(resources.GetObject("lblInvoice.Size")));
            this.lblInvoice.TabIndex = ((int)(resources.GetObject("lblInvoice.TabIndex")));
            this.lblInvoice.Text = resources.GetString("lblInvoice.Text");
            this.lblInvoice.TextAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("lblInvoice.TextAlign")));
            this.lblInvoice.Visible = ((bool)(resources.GetObject("lblInvoice.Visible")));
            // 
            // lblPostDate
            // 
            this.lblPostDate.AccessibleDescription = resources.GetString("lblPostDate.AccessibleDescription");
            this.lblPostDate.AccessibleName = resources.GetString("lblPostDate.AccessibleName");
            this.lblPostDate.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("lblPostDate.Anchor")));
            this.lblPostDate.AutoSize = ((bool)(resources.GetObject("lblPostDate.AutoSize")));
            this.lblPostDate.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("lblPostDate.Dock")));
            this.lblPostDate.Enabled = ((bool)(resources.GetObject("lblPostDate.Enabled")));
            this.lblPostDate.Font = ((System.Drawing.Font)(resources.GetObject("lblPostDate.Font")));
            this.lblPostDate.ForeColor = System.Drawing.Color.Maroon;
            this.lblPostDate.Image = ((System.Drawing.Image)(resources.GetObject("lblPostDate.Image")));
            this.lblPostDate.ImageAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("lblPostDate.ImageAlign")));
            this.lblPostDate.ImageIndex = ((int)(resources.GetObject("lblPostDate.ImageIndex")));
            this.lblPostDate.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("lblPostDate.ImeMode")));
            this.lblPostDate.Location = ((System.Drawing.Point)(resources.GetObject("lblPostDate.Location")));
            this.lblPostDate.Name = "lblPostDate";
            this.lblPostDate.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("lblPostDate.RightToLeft")));
            this.lblPostDate.Size = ((System.Drawing.Size)(resources.GetObject("lblPostDate.Size")));
            this.lblPostDate.TabIndex = ((int)(resources.GetObject("lblPostDate.TabIndex")));
            this.lblPostDate.Text = resources.GetString("lblPostDate.Text");
            this.lblPostDate.TextAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("lblPostDate.TextAlign")));
            this.lblPostDate.Visible = ((bool)(resources.GetObject("lblPostDate.Visible")));
            // 
            // btnClose
            // 
            this.btnClose.AccessibleDescription = resources.GetString("btnClose.AccessibleDescription");
            this.btnClose.AccessibleName = resources.GetString("btnClose.AccessibleName");
            this.btnClose.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("btnClose.Anchor")));
            this.btnClose.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("btnClose.BackgroundImage")));
            this.btnClose.DialogResult = System.Windows.Forms.DialogResult.Cancel;
            this.btnClose.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("btnClose.Dock")));
            this.btnClose.Enabled = ((bool)(resources.GetObject("btnClose.Enabled")));
            this.btnClose.FlatStyle = ((System.Windows.Forms.FlatStyle)(resources.GetObject("btnClose.FlatStyle")));
            this.btnClose.Font = ((System.Drawing.Font)(resources.GetObject("btnClose.Font")));
            this.btnClose.Image = ((System.Drawing.Image)(resources.GetObject("btnClose.Image")));
            this.btnClose.ImageAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("btnClose.ImageAlign")));
            this.btnClose.ImageIndex = ((int)(resources.GetObject("btnClose.ImageIndex")));
            this.btnClose.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("btnClose.ImeMode")));
            this.btnClose.Location = ((System.Drawing.Point)(resources.GetObject("btnClose.Location")));
            this.btnClose.Name = "btnClose";
            this.btnClose.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("btnClose.RightToLeft")));
            this.btnClose.Size = ((System.Drawing.Size)(resources.GetObject("btnClose.Size")));
            this.btnClose.TabIndex = ((int)(resources.GetObject("btnClose.TabIndex")));
            this.btnClose.Text = resources.GetString("btnClose.Text");
            this.btnClose.TextAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("btnClose.TextAlign")));
            this.btnClose.Visible = ((bool)(resources.GetObject("btnClose.Visible")));
            this.btnClose.Click += new System.EventHandler(this.btnClose_Click);
            // 
            // btnHelp
            // 
            this.btnHelp.AccessibleDescription = resources.GetString("btnHelp.AccessibleDescription");
            this.btnHelp.AccessibleName = resources.GetString("btnHelp.AccessibleName");
            this.btnHelp.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("btnHelp.Anchor")));
            this.btnHelp.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("btnHelp.BackgroundImage")));
            this.btnHelp.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("btnHelp.Dock")));
            this.btnHelp.Enabled = ((bool)(resources.GetObject("btnHelp.Enabled")));
            this.btnHelp.FlatStyle = ((System.Windows.Forms.FlatStyle)(resources.GetObject("btnHelp.FlatStyle")));
            this.btnHelp.Font = ((System.Drawing.Font)(resources.GetObject("btnHelp.Font")));
            this.btnHelp.Image = ((System.Drawing.Image)(resources.GetObject("btnHelp.Image")));
            this.btnHelp.ImageAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("btnHelp.ImageAlign")));
            this.btnHelp.ImageIndex = ((int)(resources.GetObject("btnHelp.ImageIndex")));
            this.btnHelp.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("btnHelp.ImeMode")));
            this.btnHelp.Location = ((System.Drawing.Point)(resources.GetObject("btnHelp.Location")));
            this.btnHelp.Name = "btnHelp";
            this.btnHelp.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("btnHelp.RightToLeft")));
            this.btnHelp.Size = ((System.Drawing.Size)(resources.GetObject("btnHelp.Size")));
            this.btnHelp.TabIndex = ((int)(resources.GetObject("btnHelp.TabIndex")));
            this.btnHelp.Text = resources.GetString("btnHelp.Text");
            this.btnHelp.TextAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("btnHelp.TextAlign")));
            this.btnHelp.Visible = ((bool)(resources.GetObject("btnHelp.Visible")));
            // 
            // lblComment
            // 
            this.lblComment.AccessibleDescription = resources.GetString("lblComment.AccessibleDescription");
            this.lblComment.AccessibleName = resources.GetString("lblComment.AccessibleName");
            this.lblComment.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("lblComment.Anchor")));
            this.lblComment.AutoSize = ((bool)(resources.GetObject("lblComment.AutoSize")));
            this.lblComment.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("lblComment.Dock")));
            this.lblComment.Enabled = ((bool)(resources.GetObject("lblComment.Enabled")));
            this.lblComment.Font = ((System.Drawing.Font)(resources.GetObject("lblComment.Font")));
            this.lblComment.ForeColor = System.Drawing.SystemColors.ControlText;
            this.lblComment.Image = ((System.Drawing.Image)(resources.GetObject("lblComment.Image")));
            this.lblComment.ImageAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("lblComment.ImageAlign")));
            this.lblComment.ImageIndex = ((int)(resources.GetObject("lblComment.ImageIndex")));
            this.lblComment.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("lblComment.ImeMode")));
            this.lblComment.Location = ((System.Drawing.Point)(resources.GetObject("lblComment.Location")));
            this.lblComment.Name = "lblComment";
            this.lblComment.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("lblComment.RightToLeft")));
            this.lblComment.Size = ((System.Drawing.Size)(resources.GetObject("lblComment.Size")));
            this.lblComment.TabIndex = ((int)(resources.GetObject("lblComment.TabIndex")));
            this.lblComment.Text = resources.GetString("lblComment.Text");
            this.lblComment.TextAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("lblComment.TextAlign")));
            this.lblComment.Visible = ((bool)(resources.GetObject("lblComment.Visible")));
            // 
            // txtComment
            // 
            this.txtComment.AccessibleDescription = resources.GetString("txtComment.AccessibleDescription");
            this.txtComment.AccessibleName = resources.GetString("txtComment.AccessibleName");
            this.txtComment.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("txtComment.Anchor")));
            this.txtComment.AutoSize = ((bool)(resources.GetObject("txtComment.AutoSize")));
            this.txtComment.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("txtComment.BackgroundImage")));
            this.txtComment.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("txtComment.Dock")));
            this.txtComment.Enabled = ((bool)(resources.GetObject("txtComment.Enabled")));
            this.txtComment.Font = ((System.Drawing.Font)(resources.GetObject("txtComment.Font")));
            this.txtComment.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("txtComment.ImeMode")));
            this.txtComment.Location = ((System.Drawing.Point)(resources.GetObject("txtComment.Location")));
            this.txtComment.MaxLength = ((int)(resources.GetObject("txtComment.MaxLength")));
            this.txtComment.Multiline = ((bool)(resources.GetObject("txtComment.Multiline")));
            this.txtComment.Name = "txtComment";
            this.txtComment.PasswordChar = ((char)(resources.GetObject("txtComment.PasswordChar")));
            this.txtComment.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("txtComment.RightToLeft")));
            this.txtComment.ScrollBars = ((System.Windows.Forms.ScrollBars)(resources.GetObject("txtComment.ScrollBars")));
            this.txtComment.Size = ((System.Drawing.Size)(resources.GetObject("txtComment.Size")));
            this.txtComment.TabIndex = ((int)(resources.GetObject("txtComment.TabIndex")));
            this.txtComment.Text = resources.GetString("txtComment.Text");
            this.txtComment.TextAlign = ((System.Windows.Forms.HorizontalAlignment)(resources.GetObject("txtComment.TextAlign")));
            this.txtComment.Visible = ((bool)(resources.GetObject("txtComment.Visible")));
            this.txtComment.WordWrap = ((bool)(resources.GetObject("txtComment.WordWrap")));
            // 
            // dgrdData
            // 
            this.dgrdData.AccessibleDescription = resources.GetString("dgrdData.AccessibleDescription");
            this.dgrdData.AccessibleName = resources.GetString("dgrdData.AccessibleName");
            this.dgrdData.AllowAddNew = ((bool)(resources.GetObject("dgrdData.AllowAddNew")));
            this.dgrdData.AllowArrows = ((bool)(resources.GetObject("dgrdData.AllowArrows")));
            this.dgrdData.AllowColMove = ((bool)(resources.GetObject("dgrdData.AllowColMove")));
            this.dgrdData.AllowColSelect = ((bool)(resources.GetObject("dgrdData.AllowColSelect")));
            this.dgrdData.AllowDelete = ((bool)(resources.GetObject("dgrdData.AllowDelete")));
            this.dgrdData.AllowDrag = ((bool)(resources.GetObject("dgrdData.AllowDrag")));
            this.dgrdData.AllowFilter = ((bool)(resources.GetObject("dgrdData.AllowFilter")));
            this.dgrdData.AllowHorizontalSplit = ((bool)(resources.GetObject("dgrdData.AllowHorizontalSplit")));
            this.dgrdData.AllowRowSelect = ((bool)(resources.GetObject("dgrdData.AllowRowSelect")));
            this.dgrdData.AllowSort = ((bool)(resources.GetObject("dgrdData.AllowSort")));
            this.dgrdData.AllowUpdate = ((bool)(resources.GetObject("dgrdData.AllowUpdate")));
            this.dgrdData.AllowUpdateOnBlur = ((bool)(resources.GetObject("dgrdData.AllowUpdateOnBlur")));
            this.dgrdData.AllowVerticalSplit = ((bool)(resources.GetObject("dgrdData.AllowVerticalSplit")));
            this.dgrdData.AlternatingRows = ((bool)(resources.GetObject("dgrdData.AlternatingRows")));
            this.dgrdData.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("dgrdData.Anchor")));
            this.dgrdData.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("dgrdData.BackgroundImage")));
            this.dgrdData.BorderStyle = ((System.Windows.Forms.BorderStyle)(resources.GetObject("dgrdData.BorderStyle")));
            this.dgrdData.Caption = resources.GetString("dgrdData.Caption");
            this.dgrdData.CaptionHeight = ((int)(resources.GetObject("dgrdData.CaptionHeight")));
            this.dgrdData.CellTipsDelay = ((int)(resources.GetObject("dgrdData.CellTipsDelay")));
            this.dgrdData.CellTipsWidth = ((int)(resources.GetObject("dgrdData.CellTipsWidth")));
            this.dgrdData.ChildGrid = ((C1.Win.C1TrueDBGrid.C1TrueDBGrid)(resources.GetObject("dgrdData.ChildGrid")));
            this.dgrdData.CollapseColor = ((System.Drawing.Color)(resources.GetObject("dgrdData.CollapseColor")));
            this.dgrdData.ColumnFooters = ((bool)(resources.GetObject("dgrdData.ColumnFooters")));
            this.dgrdData.ColumnHeaders = ((bool)(resources.GetObject("dgrdData.ColumnHeaders")));
            this.dgrdData.DefColWidth = ((int)(resources.GetObject("dgrdData.DefColWidth")));
            this.dgrdData.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("dgrdData.Dock")));
            this.dgrdData.EditDropDown = ((bool)(resources.GetObject("dgrdData.EditDropDown")));
            this.dgrdData.EmptyRows = ((bool)(resources.GetObject("dgrdData.EmptyRows")));
            this.dgrdData.Enabled = ((bool)(resources.GetObject("dgrdData.Enabled")));
            this.dgrdData.ExpandColor = ((System.Drawing.Color)(resources.GetObject("dgrdData.ExpandColor")));
            this.dgrdData.ExposeCellMode = ((C1.Win.C1TrueDBGrid.ExposeCellModeEnum)(resources.GetObject("dgrdData.ExposeCellMode")));
            this.dgrdData.ExtendRightColumn = ((bool)(resources.GetObject("dgrdData.ExtendRightColumn")));
            this.dgrdData.FetchRowStyles = ((bool)(resources.GetObject("dgrdData.FetchRowStyles")));
            this.dgrdData.FilterBar = ((bool)(resources.GetObject("dgrdData.FilterBar")));
            this.dgrdData.FlatStyle = ((C1.Win.C1TrueDBGrid.FlatModeEnum)(resources.GetObject("dgrdData.FlatStyle")));
            this.dgrdData.Font = ((System.Drawing.Font)(resources.GetObject("dgrdData.Font")));
            this.dgrdData.GroupByAreaVisible = ((bool)(resources.GetObject("dgrdData.GroupByAreaVisible")));
            this.dgrdData.GroupByCaption = resources.GetString("dgrdData.GroupByCaption");
            this.dgrdData.Images.Add(((System.Drawing.Image)(resources.GetObject("resource"))));
            this.dgrdData.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("dgrdData.ImeMode")));
            this.dgrdData.LinesPerRow = ((int)(resources.GetObject("dgrdData.LinesPerRow")));
            this.dgrdData.Location = ((System.Drawing.Point)(resources.GetObject("dgrdData.Location")));
            this.dgrdData.MarqueeStyle = C1.Win.C1TrueDBGrid.MarqueeEnum.DottedCellBorder;
            this.dgrdData.Name = "dgrdData";
            this.dgrdData.PictureAddnewRow = ((System.Drawing.Image)(resources.GetObject("dgrdData.PictureAddnewRow")));
            this.dgrdData.PictureCurrentRow = ((System.Drawing.Image)(resources.GetObject("dgrdData.PictureCurrentRow")));
            this.dgrdData.PictureFilterBar = ((System.Drawing.Image)(resources.GetObject("dgrdData.PictureFilterBar")));
            this.dgrdData.PictureFooterRow = ((System.Drawing.Image)(resources.GetObject("dgrdData.PictureFooterRow")));
            this.dgrdData.PictureHeaderRow = ((System.Drawing.Image)(resources.GetObject("dgrdData.PictureHeaderRow")));
            this.dgrdData.PictureModifiedRow = ((System.Drawing.Image)(resources.GetObject("dgrdData.PictureModifiedRow")));
            this.dgrdData.PictureStandardRow = ((System.Drawing.Image)(resources.GetObject("dgrdData.PictureStandardRow")));
            this.dgrdData.PreviewInfo.AllowSizing = ((bool)(resources.GetObject("dgrdData.PreviewInfo.AllowSizing")));
            this.dgrdData.PreviewInfo.Caption = resources.GetString("dgrdData.PreviewInfo.Caption");
            this.dgrdData.PreviewInfo.Location = ((System.Drawing.Point)(resources.GetObject("dgrdData.PreviewInfo.Location")));
            this.dgrdData.PreviewInfo.Size = ((System.Drawing.Size)(resources.GetObject("dgrdData.PreviewInfo.Size")));
            this.dgrdData.PreviewInfo.ToolBars = ((bool)(resources.GetObject("dgrdData.PreviewInfo.ToolBars")));
            this.dgrdData.PreviewInfo.UIStrings.Content = ((string[])(resources.GetObject("dgrdData.PreviewInfo.UIStrings.Content")));
            this.dgrdData.PreviewInfo.ZoomFactor = ((System.Double)(resources.GetObject("dgrdData.PreviewInfo.ZoomFactor")));
            this.dgrdData.PrintInfo.MaxRowHeight = ((int)(resources.GetObject("dgrdData.PrintInfo.MaxRowHeight")));
            this.dgrdData.PrintInfo.OwnerDrawPageFooter = ((bool)(resources.GetObject("dgrdData.PrintInfo.OwnerDrawPageFooter")));
            this.dgrdData.PrintInfo.OwnerDrawPageHeader = ((bool)(resources.GetObject("dgrdData.PrintInfo.OwnerDrawPageHeader")));
            this.dgrdData.PrintInfo.PageFooter = resources.GetString("dgrdData.PrintInfo.PageFooter");
            this.dgrdData.PrintInfo.PageFooterHeight = ((int)(resources.GetObject("dgrdData.PrintInfo.PageFooterHeight")));
            this.dgrdData.PrintInfo.PageHeader = resources.GetString("dgrdData.PrintInfo.PageHeader");
            this.dgrdData.PrintInfo.PageHeaderHeight = ((int)(resources.GetObject("dgrdData.PrintInfo.PageHeaderHeight")));
            this.dgrdData.PrintInfo.PrintHorizontalSplits = ((bool)(resources.GetObject("dgrdData.PrintInfo.PrintHorizontalSplits")));
            this.dgrdData.PrintInfo.ProgressCaption = resources.GetString("dgrdData.PrintInfo.ProgressCaption");
            this.dgrdData.PrintInfo.RepeatColumnFooters = ((bool)(resources.GetObject("dgrdData.PrintInfo.RepeatColumnFooters")));
            this.dgrdData.PrintInfo.RepeatColumnHeaders = ((bool)(resources.GetObject("dgrdData.PrintInfo.RepeatColumnHeaders")));
            this.dgrdData.PrintInfo.RepeatGridHeader = ((bool)(resources.GetObject("dgrdData.PrintInfo.RepeatGridHeader")));
            this.dgrdData.PrintInfo.RepeatSplitHeaders = ((bool)(resources.GetObject("dgrdData.PrintInfo.RepeatSplitHeaders")));
            this.dgrdData.PrintInfo.ShowOptionsDialog = ((bool)(resources.GetObject("dgrdData.PrintInfo.ShowOptionsDialog")));
            this.dgrdData.PrintInfo.ShowProgressForm = ((bool)(resources.GetObject("dgrdData.PrintInfo.ShowProgressForm")));
            this.dgrdData.PrintInfo.ShowSelection = ((bool)(resources.GetObject("dgrdData.PrintInfo.ShowSelection")));
            this.dgrdData.PrintInfo.UseGridColors = ((bool)(resources.GetObject("dgrdData.PrintInfo.UseGridColors")));
            this.dgrdData.RecordSelectors = ((bool)(resources.GetObject("dgrdData.RecordSelectors")));
            this.dgrdData.RecordSelectorWidth = ((int)(resources.GetObject("dgrdData.RecordSelectorWidth")));
            this.dgrdData.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("dgrdData.RightToLeft")));
            this.dgrdData.RowDivider.Color = ((System.Drawing.Color)(resources.GetObject("resource.Color")));
            this.dgrdData.RowDivider.Style = ((C1.Win.C1TrueDBGrid.LineStyleEnum)(resources.GetObject("resource.Style")));
            this.dgrdData.RowHeight = ((int)(resources.GetObject("dgrdData.RowHeight")));
            this.dgrdData.RowSubDividerColor = ((System.Drawing.Color)(resources.GetObject("dgrdData.RowSubDividerColor")));
            this.dgrdData.ScrollTips = ((bool)(resources.GetObject("dgrdData.ScrollTips")));
            this.dgrdData.ScrollTrack = ((bool)(resources.GetObject("dgrdData.ScrollTrack")));
            this.dgrdData.Size = ((System.Drawing.Size)(resources.GetObject("dgrdData.Size")));
            this.dgrdData.SpringMode = ((bool)(resources.GetObject("dgrdData.SpringMode")));
            this.dgrdData.TabAcrossSplits = ((bool)(resources.GetObject("dgrdData.TabAcrossSplits")));
            this.dgrdData.TabIndex = ((int)(resources.GetObject("dgrdData.TabIndex")));
            this.dgrdData.Text = resources.GetString("dgrdData.Text");
            this.dgrdData.ViewCaptionWidth = ((int)(resources.GetObject("dgrdData.ViewCaptionWidth")));
            this.dgrdData.ViewColumnWidth = ((int)(resources.GetObject("dgrdData.ViewColumnWidth")));
            this.dgrdData.Visible = ((bool)(resources.GetObject("dgrdData.Visible")));
            this.dgrdData.WrapCellPointer = ((bool)(resources.GetObject("dgrdData.WrapCellPointer")));
            this.dgrdData.ButtonClick += new C1.Win.C1TrueDBGrid.ColEventHandler(this.dgrdData_ButtonClick);
            this.dgrdData.AfterColUpdate += new C1.Win.C1TrueDBGrid.ColEventHandler(this.dgrdData_AfterColUpdate);
            this.dgrdData.BeforeColUpdate += new C1.Win.C1TrueDBGrid.BeforeColUpdateEventHandler(this.dgrdData_BeforeColUpdate);
            this.dgrdData.KeyDown += new System.Windows.Forms.KeyEventHandler(this.dgrdData_KeyDown);
            this.dgrdData.PropBag = resources.GetString("dgrdData.PropBag");
            // 
            // txtTransNo
            // 
            this.txtTransNo.AccessibleDescription = resources.GetString("txtTransNo.AccessibleDescription");
            this.txtTransNo.AccessibleName = resources.GetString("txtTransNo.AccessibleName");
            this.txtTransNo.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("txtTransNo.Anchor")));
            this.txtTransNo.AutoSize = ((bool)(resources.GetObject("txtTransNo.AutoSize")));
            this.txtTransNo.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("txtTransNo.BackgroundImage")));
            this.txtTransNo.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("txtTransNo.Dock")));
            this.txtTransNo.Enabled = ((bool)(resources.GetObject("txtTransNo.Enabled")));
            this.txtTransNo.Font = ((System.Drawing.Font)(resources.GetObject("txtTransNo.Font")));
            this.txtTransNo.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("txtTransNo.ImeMode")));
            this.txtTransNo.Location = ((System.Drawing.Point)(resources.GetObject("txtTransNo.Location")));
            this.txtTransNo.MaxLength = ((int)(resources.GetObject("txtTransNo.MaxLength")));
            this.txtTransNo.Multiline = ((bool)(resources.GetObject("txtTransNo.Multiline")));
            this.txtTransNo.Name = "txtTransNo";
            this.txtTransNo.PasswordChar = ((char)(resources.GetObject("txtTransNo.PasswordChar")));
            this.txtTransNo.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("txtTransNo.RightToLeft")));
            this.txtTransNo.ScrollBars = ((System.Windows.Forms.ScrollBars)(resources.GetObject("txtTransNo.ScrollBars")));
            this.txtTransNo.Size = ((System.Drawing.Size)(resources.GetObject("txtTransNo.Size")));
            this.txtTransNo.TabIndex = ((int)(resources.GetObject("txtTransNo.TabIndex")));
            this.txtTransNo.Text = resources.GetString("txtTransNo.Text");
            this.txtTransNo.TextAlign = ((System.Windows.Forms.HorizontalAlignment)(resources.GetObject("txtTransNo.TextAlign")));
            this.txtTransNo.Visible = ((bool)(resources.GetObject("txtTransNo.Visible")));
            this.txtTransNo.WordWrap = ((bool)(resources.GetObject("txtTransNo.WordWrap")));
            this.txtTransNo.KeyDown += new System.Windows.Forms.KeyEventHandler(this.txtTransNo_KeyDown);
            this.txtTransNo.Validating += new System.ComponentModel.CancelEventHandler(this.txtTransNo_Validating);
            // 
            // btnTransNo
            // 
            this.btnTransNo.AccessibleDescription = resources.GetString("btnTransNo.AccessibleDescription");
            this.btnTransNo.AccessibleName = resources.GetString("btnTransNo.AccessibleName");
            this.btnTransNo.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("btnTransNo.Anchor")));
            this.btnTransNo.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("btnTransNo.BackgroundImage")));
            this.btnTransNo.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("btnTransNo.Dock")));
            this.btnTransNo.Enabled = ((bool)(resources.GetObject("btnTransNo.Enabled")));
            this.btnTransNo.FlatStyle = ((System.Windows.Forms.FlatStyle)(resources.GetObject("btnTransNo.FlatStyle")));
            this.btnTransNo.Font = ((System.Drawing.Font)(resources.GetObject("btnTransNo.Font")));
            this.btnTransNo.Image = ((System.Drawing.Image)(resources.GetObject("btnTransNo.Image")));
            this.btnTransNo.ImageAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("btnTransNo.ImageAlign")));
            this.btnTransNo.ImageIndex = ((int)(resources.GetObject("btnTransNo.ImageIndex")));
            this.btnTransNo.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("btnTransNo.ImeMode")));
            this.btnTransNo.Location = ((System.Drawing.Point)(resources.GetObject("btnTransNo.Location")));
            this.btnTransNo.Name = "btnTransNo";
            this.btnTransNo.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("btnTransNo.RightToLeft")));
            this.btnTransNo.Size = ((System.Drawing.Size)(resources.GetObject("btnTransNo.Size")));
            this.btnTransNo.TabIndex = ((int)(resources.GetObject("btnTransNo.TabIndex")));
            this.btnTransNo.Text = resources.GetString("btnTransNo.Text");
            this.btnTransNo.TextAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("btnTransNo.TextAlign")));
            this.btnTransNo.Visible = ((bool)(resources.GetObject("btnTransNo.Visible")));
            this.btnTransNo.Click += new System.EventHandler(this.btnTransNo_Click);
            // 
            // lblTransNo
            // 
            this.lblTransNo.AccessibleDescription = resources.GetString("lblTransNo.AccessibleDescription");
            this.lblTransNo.AccessibleName = resources.GetString("lblTransNo.AccessibleName");
            this.lblTransNo.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("lblTransNo.Anchor")));
            this.lblTransNo.AutoSize = ((bool)(resources.GetObject("lblTransNo.AutoSize")));
            this.lblTransNo.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("lblTransNo.Dock")));
            this.lblTransNo.Enabled = ((bool)(resources.GetObject("lblTransNo.Enabled")));
            this.lblTransNo.Font = ((System.Drawing.Font)(resources.GetObject("lblTransNo.Font")));
            this.lblTransNo.ForeColor = System.Drawing.Color.Maroon;
            this.lblTransNo.Image = ((System.Drawing.Image)(resources.GetObject("lblTransNo.Image")));
            this.lblTransNo.ImageAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("lblTransNo.ImageAlign")));
            this.lblTransNo.ImageIndex = ((int)(resources.GetObject("lblTransNo.ImageIndex")));
            this.lblTransNo.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("lblTransNo.ImeMode")));
            this.lblTransNo.Location = ((System.Drawing.Point)(resources.GetObject("lblTransNo.Location")));
            this.lblTransNo.Name = "lblTransNo";
            this.lblTransNo.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("lblTransNo.RightToLeft")));
            this.lblTransNo.Size = ((System.Drawing.Size)(resources.GetObject("lblTransNo.Size")));
            this.lblTransNo.TabIndex = ((int)(resources.GetObject("lblTransNo.TabIndex")));
            this.lblTransNo.Text = resources.GetString("lblTransNo.Text");
            this.lblTransNo.TextAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("lblTransNo.TextAlign")));
            this.lblTransNo.Visible = ((bool)(resources.GetObject("lblTransNo.Visible")));
            // 
            // grbDestination
            // 
            this.grbDestination.AccessibleDescription = resources.GetString("grbDestination.AccessibleDescription");
            this.grbDestination.AccessibleName = resources.GetString("grbDestination.AccessibleName");
            this.grbDestination.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("grbDestination.Anchor")));
            this.grbDestination.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("grbDestination.BackgroundImage")));
            this.grbDestination.Controls.Add(this.btnPartyName);
            this.grbDestination.Controls.Add(this.txtPartyName);
            this.grbDestination.Controls.Add(this.txtDestLoc);
            this.grbDestination.Controls.Add(this.btnDestLoc);
            this.grbDestination.Controls.Add(this.txtDestMasLoc);
            this.grbDestination.Controls.Add(this.btnDestMasLoc);
            this.grbDestination.Controls.Add(this.lblDestLoc);
            this.grbDestination.Controls.Add(this.lblDestMasLoc);
            this.grbDestination.Controls.Add(this.lblDestBin);
            this.grbDestination.Controls.Add(this.btnDestBin);
            this.grbDestination.Controls.Add(this.txtDestBin);
            this.grbDestination.Controls.Add(this.lblParty);
            this.grbDestination.Controls.Add(this.btnParty);
            this.grbDestination.Controls.Add(this.txtParty);
            this.grbDestination.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("grbDestination.Dock")));
            this.grbDestination.Enabled = ((bool)(resources.GetObject("grbDestination.Enabled")));
            this.grbDestination.Font = ((System.Drawing.Font)(resources.GetObject("grbDestination.Font")));
            this.grbDestination.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("grbDestination.ImeMode")));
            this.grbDestination.Location = ((System.Drawing.Point)(resources.GetObject("grbDestination.Location")));
            this.grbDestination.Name = "grbDestination";
            this.grbDestination.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("grbDestination.RightToLeft")));
            this.grbDestination.Size = ((System.Drawing.Size)(resources.GetObject("grbDestination.Size")));
            this.grbDestination.TabIndex = ((int)(resources.GetObject("grbDestination.TabIndex")));
            this.grbDestination.TabStop = false;
            this.grbDestination.Text = resources.GetString("grbDestination.Text");
            this.grbDestination.Visible = ((bool)(resources.GetObject("grbDestination.Visible")));
            // 
            // btnPartyName
            // 
            this.btnPartyName.AccessibleDescription = resources.GetString("btnPartyName.AccessibleDescription");
            this.btnPartyName.AccessibleName = resources.GetString("btnPartyName.AccessibleName");
            this.btnPartyName.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("btnPartyName.Anchor")));
            this.btnPartyName.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("btnPartyName.BackgroundImage")));
            this.btnPartyName.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("btnPartyName.Dock")));
            this.btnPartyName.Enabled = ((bool)(resources.GetObject("btnPartyName.Enabled")));
            this.btnPartyName.FlatStyle = ((System.Windows.Forms.FlatStyle)(resources.GetObject("btnPartyName.FlatStyle")));
            this.btnPartyName.Font = ((System.Drawing.Font)(resources.GetObject("btnPartyName.Font")));
            this.btnPartyName.Image = ((System.Drawing.Image)(resources.GetObject("btnPartyName.Image")));
            this.btnPartyName.ImageAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("btnPartyName.ImageAlign")));
            this.btnPartyName.ImageIndex = ((int)(resources.GetObject("btnPartyName.ImageIndex")));
            this.btnPartyName.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("btnPartyName.ImeMode")));
            this.btnPartyName.Location = ((System.Drawing.Point)(resources.GetObject("btnPartyName.Location")));
            this.btnPartyName.Name = "btnPartyName";
            this.btnPartyName.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("btnPartyName.RightToLeft")));
            this.btnPartyName.Size = ((System.Drawing.Size)(resources.GetObject("btnPartyName.Size")));
            this.btnPartyName.TabIndex = ((int)(resources.GetObject("btnPartyName.TabIndex")));
            this.btnPartyName.Text = resources.GetString("btnPartyName.Text");
            this.btnPartyName.TextAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("btnPartyName.TextAlign")));
            this.btnPartyName.Visible = ((bool)(resources.GetObject("btnPartyName.Visible")));
            this.btnPartyName.Click += new System.EventHandler(this.btnPartyName_Click);
            // 
            // txtPartyName
            // 
            this.txtPartyName.AccessibleDescription = resources.GetString("txtPartyName.AccessibleDescription");
            this.txtPartyName.AccessibleName = resources.GetString("txtPartyName.AccessibleName");
            this.txtPartyName.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("txtPartyName.Anchor")));
            this.txtPartyName.AutoSize = ((bool)(resources.GetObject("txtPartyName.AutoSize")));
            this.txtPartyName.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("txtPartyName.BackgroundImage")));
            this.txtPartyName.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("txtPartyName.Dock")));
            this.txtPartyName.Enabled = ((bool)(resources.GetObject("txtPartyName.Enabled")));
            this.txtPartyName.Font = ((System.Drawing.Font)(resources.GetObject("txtPartyName.Font")));
            this.txtPartyName.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("txtPartyName.ImeMode")));
            this.txtPartyName.Location = ((System.Drawing.Point)(resources.GetObject("txtPartyName.Location")));
            this.txtPartyName.MaxLength = ((int)(resources.GetObject("txtPartyName.MaxLength")));
            this.txtPartyName.Multiline = ((bool)(resources.GetObject("txtPartyName.Multiline")));
            this.txtPartyName.Name = "txtPartyName";
            this.txtPartyName.PasswordChar = ((char)(resources.GetObject("txtPartyName.PasswordChar")));
            this.txtPartyName.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("txtPartyName.RightToLeft")));
            this.txtPartyName.ScrollBars = ((System.Windows.Forms.ScrollBars)(resources.GetObject("txtPartyName.ScrollBars")));
            this.txtPartyName.Size = ((System.Drawing.Size)(resources.GetObject("txtPartyName.Size")));
            this.txtPartyName.TabIndex = ((int)(resources.GetObject("txtPartyName.TabIndex")));
            this.txtPartyName.Text = resources.GetString("txtPartyName.Text");
            this.txtPartyName.TextAlign = ((System.Windows.Forms.HorizontalAlignment)(resources.GetObject("txtPartyName.TextAlign")));
            this.txtPartyName.Visible = ((bool)(resources.GetObject("txtPartyName.Visible")));
            this.txtPartyName.WordWrap = ((bool)(resources.GetObject("txtPartyName.WordWrap")));
            this.txtPartyName.KeyDown += new System.Windows.Forms.KeyEventHandler(this.txtPartyName_KeyDown);
            this.txtPartyName.Validating += new System.ComponentModel.CancelEventHandler(this.txtPartyName_Validating);
            // 
            // txtDestLoc
            // 
            this.txtDestLoc.AccessibleDescription = resources.GetString("txtDestLoc.AccessibleDescription");
            this.txtDestLoc.AccessibleName = resources.GetString("txtDestLoc.AccessibleName");
            this.txtDestLoc.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("txtDestLoc.Anchor")));
            this.txtDestLoc.AutoSize = ((bool)(resources.GetObject("txtDestLoc.AutoSize")));
            this.txtDestLoc.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("txtDestLoc.BackgroundImage")));
            this.txtDestLoc.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("txtDestLoc.Dock")));
            this.txtDestLoc.Enabled = ((bool)(resources.GetObject("txtDestLoc.Enabled")));
            this.txtDestLoc.Font = ((System.Drawing.Font)(resources.GetObject("txtDestLoc.Font")));
            this.txtDestLoc.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("txtDestLoc.ImeMode")));
            this.txtDestLoc.Location = ((System.Drawing.Point)(resources.GetObject("txtDestLoc.Location")));
            this.txtDestLoc.MaxLength = ((int)(resources.GetObject("txtDestLoc.MaxLength")));
            this.txtDestLoc.Multiline = ((bool)(resources.GetObject("txtDestLoc.Multiline")));
            this.txtDestLoc.Name = "txtDestLoc";
            this.txtDestLoc.PasswordChar = ((char)(resources.GetObject("txtDestLoc.PasswordChar")));
            this.txtDestLoc.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("txtDestLoc.RightToLeft")));
            this.txtDestLoc.ScrollBars = ((System.Windows.Forms.ScrollBars)(resources.GetObject("txtDestLoc.ScrollBars")));
            this.txtDestLoc.Size = ((System.Drawing.Size)(resources.GetObject("txtDestLoc.Size")));
            this.txtDestLoc.TabIndex = ((int)(resources.GetObject("txtDestLoc.TabIndex")));
            this.txtDestLoc.Text = resources.GetString("txtDestLoc.Text");
            this.txtDestLoc.TextAlign = ((System.Windows.Forms.HorizontalAlignment)(resources.GetObject("txtDestLoc.TextAlign")));
            this.txtDestLoc.Visible = ((bool)(resources.GetObject("txtDestLoc.Visible")));
            this.txtDestLoc.WordWrap = ((bool)(resources.GetObject("txtDestLoc.WordWrap")));
            this.txtDestLoc.KeyDown += new System.Windows.Forms.KeyEventHandler(this.txtDestLoc_KeyDown);
            this.txtDestLoc.Validating += new System.ComponentModel.CancelEventHandler(this.txtDestLoc_Validating);
            // 
            // btnDestLoc
            // 
            this.btnDestLoc.AccessibleDescription = resources.GetString("btnDestLoc.AccessibleDescription");
            this.btnDestLoc.AccessibleName = resources.GetString("btnDestLoc.AccessibleName");
            this.btnDestLoc.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("btnDestLoc.Anchor")));
            this.btnDestLoc.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("btnDestLoc.BackgroundImage")));
            this.btnDestLoc.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("btnDestLoc.Dock")));
            this.btnDestLoc.Enabled = ((bool)(resources.GetObject("btnDestLoc.Enabled")));
            this.btnDestLoc.FlatStyle = ((System.Windows.Forms.FlatStyle)(resources.GetObject("btnDestLoc.FlatStyle")));
            this.btnDestLoc.Font = ((System.Drawing.Font)(resources.GetObject("btnDestLoc.Font")));
            this.btnDestLoc.Image = ((System.Drawing.Image)(resources.GetObject("btnDestLoc.Image")));
            this.btnDestLoc.ImageAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("btnDestLoc.ImageAlign")));
            this.btnDestLoc.ImageIndex = ((int)(resources.GetObject("btnDestLoc.ImageIndex")));
            this.btnDestLoc.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("btnDestLoc.ImeMode")));
            this.btnDestLoc.Location = ((System.Drawing.Point)(resources.GetObject("btnDestLoc.Location")));
            this.btnDestLoc.Name = "btnDestLoc";
            this.btnDestLoc.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("btnDestLoc.RightToLeft")));
            this.btnDestLoc.Size = ((System.Drawing.Size)(resources.GetObject("btnDestLoc.Size")));
            this.btnDestLoc.TabIndex = ((int)(resources.GetObject("btnDestLoc.TabIndex")));
            this.btnDestLoc.Text = resources.GetString("btnDestLoc.Text");
            this.btnDestLoc.TextAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("btnDestLoc.TextAlign")));
            this.btnDestLoc.Visible = ((bool)(resources.GetObject("btnDestLoc.Visible")));
            this.btnDestLoc.Click += new System.EventHandler(this.btnDestLoc_Click);
            // 
            // txtDestMasLoc
            // 
            this.txtDestMasLoc.AccessibleDescription = resources.GetString("txtDestMasLoc.AccessibleDescription");
            this.txtDestMasLoc.AccessibleName = resources.GetString("txtDestMasLoc.AccessibleName");
            this.txtDestMasLoc.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("txtDestMasLoc.Anchor")));
            this.txtDestMasLoc.AutoSize = ((bool)(resources.GetObject("txtDestMasLoc.AutoSize")));
            this.txtDestMasLoc.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("txtDestMasLoc.BackgroundImage")));
            this.txtDestMasLoc.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("txtDestMasLoc.Dock")));
            this.txtDestMasLoc.Enabled = ((bool)(resources.GetObject("txtDestMasLoc.Enabled")));
            this.txtDestMasLoc.Font = ((System.Drawing.Font)(resources.GetObject("txtDestMasLoc.Font")));
            this.txtDestMasLoc.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("txtDestMasLoc.ImeMode")));
            this.txtDestMasLoc.Location = ((System.Drawing.Point)(resources.GetObject("txtDestMasLoc.Location")));
            this.txtDestMasLoc.MaxLength = ((int)(resources.GetObject("txtDestMasLoc.MaxLength")));
            this.txtDestMasLoc.Multiline = ((bool)(resources.GetObject("txtDestMasLoc.Multiline")));
            this.txtDestMasLoc.Name = "txtDestMasLoc";
            this.txtDestMasLoc.PasswordChar = ((char)(resources.GetObject("txtDestMasLoc.PasswordChar")));
            this.txtDestMasLoc.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("txtDestMasLoc.RightToLeft")));
            this.txtDestMasLoc.ScrollBars = ((System.Windows.Forms.ScrollBars)(resources.GetObject("txtDestMasLoc.ScrollBars")));
            this.txtDestMasLoc.Size = ((System.Drawing.Size)(resources.GetObject("txtDestMasLoc.Size")));
            this.txtDestMasLoc.TabIndex = ((int)(resources.GetObject("txtDestMasLoc.TabIndex")));
            this.txtDestMasLoc.Text = resources.GetString("txtDestMasLoc.Text");
            this.txtDestMasLoc.TextAlign = ((System.Windows.Forms.HorizontalAlignment)(resources.GetObject("txtDestMasLoc.TextAlign")));
            this.txtDestMasLoc.Visible = ((bool)(resources.GetObject("txtDestMasLoc.Visible")));
            this.txtDestMasLoc.WordWrap = ((bool)(resources.GetObject("txtDestMasLoc.WordWrap")));
            this.txtDestMasLoc.KeyDown += new System.Windows.Forms.KeyEventHandler(this.txtDestMasLoc_KeyDown);
            this.txtDestMasLoc.Validating += new System.ComponentModel.CancelEventHandler(this.txtDestMasLoc_Validating);
            // 
            // btnDestMasLoc
            // 
            this.btnDestMasLoc.AccessibleDescription = resources.GetString("btnDestMasLoc.AccessibleDescription");
            this.btnDestMasLoc.AccessibleName = resources.GetString("btnDestMasLoc.AccessibleName");
            this.btnDestMasLoc.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("btnDestMasLoc.Anchor")));
            this.btnDestMasLoc.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("btnDestMasLoc.BackgroundImage")));
            this.btnDestMasLoc.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("btnDestMasLoc.Dock")));
            this.btnDestMasLoc.Enabled = ((bool)(resources.GetObject("btnDestMasLoc.Enabled")));
            this.btnDestMasLoc.FlatStyle = ((System.Windows.Forms.FlatStyle)(resources.GetObject("btnDestMasLoc.FlatStyle")));
            this.btnDestMasLoc.Font = ((System.Drawing.Font)(resources.GetObject("btnDestMasLoc.Font")));
            this.btnDestMasLoc.Image = ((System.Drawing.Image)(resources.GetObject("btnDestMasLoc.Image")));
            this.btnDestMasLoc.ImageAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("btnDestMasLoc.ImageAlign")));
            this.btnDestMasLoc.ImageIndex = ((int)(resources.GetObject("btnDestMasLoc.ImageIndex")));
            this.btnDestMasLoc.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("btnDestMasLoc.ImeMode")));
            this.btnDestMasLoc.Location = ((System.Drawing.Point)(resources.GetObject("btnDestMasLoc.Location")));
            this.btnDestMasLoc.Name = "btnDestMasLoc";
            this.btnDestMasLoc.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("btnDestMasLoc.RightToLeft")));
            this.btnDestMasLoc.Size = ((System.Drawing.Size)(resources.GetObject("btnDestMasLoc.Size")));
            this.btnDestMasLoc.TabIndex = ((int)(resources.GetObject("btnDestMasLoc.TabIndex")));
            this.btnDestMasLoc.Text = resources.GetString("btnDestMasLoc.Text");
            this.btnDestMasLoc.TextAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("btnDestMasLoc.TextAlign")));
            this.btnDestMasLoc.Visible = ((bool)(resources.GetObject("btnDestMasLoc.Visible")));
            this.btnDestMasLoc.Click += new System.EventHandler(this.btnDestMasLoc_Click);
            // 
            // lblDestLoc
            // 
            this.lblDestLoc.AccessibleDescription = resources.GetString("lblDestLoc.AccessibleDescription");
            this.lblDestLoc.AccessibleName = resources.GetString("lblDestLoc.AccessibleName");
            this.lblDestLoc.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("lblDestLoc.Anchor")));
            this.lblDestLoc.AutoSize = ((bool)(resources.GetObject("lblDestLoc.AutoSize")));
            this.lblDestLoc.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("lblDestLoc.Dock")));
            this.lblDestLoc.Enabled = ((bool)(resources.GetObject("lblDestLoc.Enabled")));
            this.lblDestLoc.Font = ((System.Drawing.Font)(resources.GetObject("lblDestLoc.Font")));
            this.lblDestLoc.ForeColor = System.Drawing.SystemColors.ControlText;
            this.lblDestLoc.Image = ((System.Drawing.Image)(resources.GetObject("lblDestLoc.Image")));
            this.lblDestLoc.ImageAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("lblDestLoc.ImageAlign")));
            this.lblDestLoc.ImageIndex = ((int)(resources.GetObject("lblDestLoc.ImageIndex")));
            this.lblDestLoc.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("lblDestLoc.ImeMode")));
            this.lblDestLoc.Location = ((System.Drawing.Point)(resources.GetObject("lblDestLoc.Location")));
            this.lblDestLoc.Name = "lblDestLoc";
            this.lblDestLoc.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("lblDestLoc.RightToLeft")));
            this.lblDestLoc.Size = ((System.Drawing.Size)(resources.GetObject("lblDestLoc.Size")));
            this.lblDestLoc.TabIndex = ((int)(resources.GetObject("lblDestLoc.TabIndex")));
            this.lblDestLoc.Text = resources.GetString("lblDestLoc.Text");
            this.lblDestLoc.TextAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("lblDestLoc.TextAlign")));
            this.lblDestLoc.Visible = ((bool)(resources.GetObject("lblDestLoc.Visible")));
            // 
            // lblDestMasLoc
            // 
            this.lblDestMasLoc.AccessibleDescription = resources.GetString("lblDestMasLoc.AccessibleDescription");
            this.lblDestMasLoc.AccessibleName = resources.GetString("lblDestMasLoc.AccessibleName");
            this.lblDestMasLoc.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("lblDestMasLoc.Anchor")));
            this.lblDestMasLoc.AutoSize = ((bool)(resources.GetObject("lblDestMasLoc.AutoSize")));
            this.lblDestMasLoc.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("lblDestMasLoc.Dock")));
            this.lblDestMasLoc.Enabled = ((bool)(resources.GetObject("lblDestMasLoc.Enabled")));
            this.lblDestMasLoc.Font = ((System.Drawing.Font)(resources.GetObject("lblDestMasLoc.Font")));
            this.lblDestMasLoc.ForeColor = System.Drawing.SystemColors.ControlText;
            this.lblDestMasLoc.Image = ((System.Drawing.Image)(resources.GetObject("lblDestMasLoc.Image")));
            this.lblDestMasLoc.ImageAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("lblDestMasLoc.ImageAlign")));
            this.lblDestMasLoc.ImageIndex = ((int)(resources.GetObject("lblDestMasLoc.ImageIndex")));
            this.lblDestMasLoc.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("lblDestMasLoc.ImeMode")));
            this.lblDestMasLoc.Location = ((System.Drawing.Point)(resources.GetObject("lblDestMasLoc.Location")));
            this.lblDestMasLoc.Name = "lblDestMasLoc";
            this.lblDestMasLoc.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("lblDestMasLoc.RightToLeft")));
            this.lblDestMasLoc.Size = ((System.Drawing.Size)(resources.GetObject("lblDestMasLoc.Size")));
            this.lblDestMasLoc.TabIndex = ((int)(resources.GetObject("lblDestMasLoc.TabIndex")));
            this.lblDestMasLoc.Text = resources.GetString("lblDestMasLoc.Text");
            this.lblDestMasLoc.TextAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("lblDestMasLoc.TextAlign")));
            this.lblDestMasLoc.Visible = ((bool)(resources.GetObject("lblDestMasLoc.Visible")));
            // 
            // lblDestBin
            // 
            this.lblDestBin.AccessibleDescription = resources.GetString("lblDestBin.AccessibleDescription");
            this.lblDestBin.AccessibleName = resources.GetString("lblDestBin.AccessibleName");
            this.lblDestBin.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("lblDestBin.Anchor")));
            this.lblDestBin.AutoSize = ((bool)(resources.GetObject("lblDestBin.AutoSize")));
            this.lblDestBin.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("lblDestBin.Dock")));
            this.lblDestBin.Enabled = ((bool)(resources.GetObject("lblDestBin.Enabled")));
            this.lblDestBin.Font = ((System.Drawing.Font)(resources.GetObject("lblDestBin.Font")));
            this.lblDestBin.Image = ((System.Drawing.Image)(resources.GetObject("lblDestBin.Image")));
            this.lblDestBin.ImageAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("lblDestBin.ImageAlign")));
            this.lblDestBin.ImageIndex = ((int)(resources.GetObject("lblDestBin.ImageIndex")));
            this.lblDestBin.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("lblDestBin.ImeMode")));
            this.lblDestBin.Location = ((System.Drawing.Point)(resources.GetObject("lblDestBin.Location")));
            this.lblDestBin.Name = "lblDestBin";
            this.lblDestBin.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("lblDestBin.RightToLeft")));
            this.lblDestBin.Size = ((System.Drawing.Size)(resources.GetObject("lblDestBin.Size")));
            this.lblDestBin.TabIndex = ((int)(resources.GetObject("lblDestBin.TabIndex")));
            this.lblDestBin.Text = resources.GetString("lblDestBin.Text");
            this.lblDestBin.TextAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("lblDestBin.TextAlign")));
            this.lblDestBin.Visible = ((bool)(resources.GetObject("lblDestBin.Visible")));
            // 
            // btnDestBin
            // 
            this.btnDestBin.AccessibleDescription = resources.GetString("btnDestBin.AccessibleDescription");
            this.btnDestBin.AccessibleName = resources.GetString("btnDestBin.AccessibleName");
            this.btnDestBin.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("btnDestBin.Anchor")));
            this.btnDestBin.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("btnDestBin.BackgroundImage")));
            this.btnDestBin.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("btnDestBin.Dock")));
            this.btnDestBin.Enabled = ((bool)(resources.GetObject("btnDestBin.Enabled")));
            this.btnDestBin.FlatStyle = ((System.Windows.Forms.FlatStyle)(resources.GetObject("btnDestBin.FlatStyle")));
            this.btnDestBin.Font = ((System.Drawing.Font)(resources.GetObject("btnDestBin.Font")));
            this.btnDestBin.Image = ((System.Drawing.Image)(resources.GetObject("btnDestBin.Image")));
            this.btnDestBin.ImageAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("btnDestBin.ImageAlign")));
            this.btnDestBin.ImageIndex = ((int)(resources.GetObject("btnDestBin.ImageIndex")));
            this.btnDestBin.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("btnDestBin.ImeMode")));
            this.btnDestBin.Location = ((System.Drawing.Point)(resources.GetObject("btnDestBin.Location")));
            this.btnDestBin.Name = "btnDestBin";
            this.btnDestBin.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("btnDestBin.RightToLeft")));
            this.btnDestBin.Size = ((System.Drawing.Size)(resources.GetObject("btnDestBin.Size")));
            this.btnDestBin.TabIndex = ((int)(resources.GetObject("btnDestBin.TabIndex")));
            this.btnDestBin.Text = resources.GetString("btnDestBin.Text");
            this.btnDestBin.TextAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("btnDestBin.TextAlign")));
            this.btnDestBin.Visible = ((bool)(resources.GetObject("btnDestBin.Visible")));
            this.btnDestBin.Click += new System.EventHandler(this.btnDestBin_Click);
            // 
            // txtDestBin
            // 
            this.txtDestBin.AccessibleDescription = resources.GetString("txtDestBin.AccessibleDescription");
            this.txtDestBin.AccessibleName = resources.GetString("txtDestBin.AccessibleName");
            this.txtDestBin.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("txtDestBin.Anchor")));
            this.txtDestBin.AutoSize = ((bool)(resources.GetObject("txtDestBin.AutoSize")));
            this.txtDestBin.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("txtDestBin.BackgroundImage")));
            this.txtDestBin.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("txtDestBin.Dock")));
            this.txtDestBin.Enabled = ((bool)(resources.GetObject("txtDestBin.Enabled")));
            this.txtDestBin.Font = ((System.Drawing.Font)(resources.GetObject("txtDestBin.Font")));
            this.txtDestBin.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("txtDestBin.ImeMode")));
            this.txtDestBin.Location = ((System.Drawing.Point)(resources.GetObject("txtDestBin.Location")));
            this.txtDestBin.MaxLength = ((int)(resources.GetObject("txtDestBin.MaxLength")));
            this.txtDestBin.Multiline = ((bool)(resources.GetObject("txtDestBin.Multiline")));
            this.txtDestBin.Name = "txtDestBin";
            this.txtDestBin.PasswordChar = ((char)(resources.GetObject("txtDestBin.PasswordChar")));
            this.txtDestBin.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("txtDestBin.RightToLeft")));
            this.txtDestBin.ScrollBars = ((System.Windows.Forms.ScrollBars)(resources.GetObject("txtDestBin.ScrollBars")));
            this.txtDestBin.Size = ((System.Drawing.Size)(resources.GetObject("txtDestBin.Size")));
            this.txtDestBin.TabIndex = ((int)(resources.GetObject("txtDestBin.TabIndex")));
            this.txtDestBin.Text = resources.GetString("txtDestBin.Text");
            this.txtDestBin.TextAlign = ((System.Windows.Forms.HorizontalAlignment)(resources.GetObject("txtDestBin.TextAlign")));
            this.txtDestBin.Visible = ((bool)(resources.GetObject("txtDestBin.Visible")));
            this.txtDestBin.WordWrap = ((bool)(resources.GetObject("txtDestBin.WordWrap")));
            this.txtDestBin.KeyDown += new System.Windows.Forms.KeyEventHandler(this.txtDestBin_KeyDown);
            this.txtDestBin.Validating += new System.ComponentModel.CancelEventHandler(this.txtDestBin_Validating);
            // 
            // lblParty
            // 
            this.lblParty.AccessibleDescription = resources.GetString("lblParty.AccessibleDescription");
            this.lblParty.AccessibleName = resources.GetString("lblParty.AccessibleName");
            this.lblParty.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("lblParty.Anchor")));
            this.lblParty.AutoSize = ((bool)(resources.GetObject("lblParty.AutoSize")));
            this.lblParty.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("lblParty.Dock")));
            this.lblParty.Enabled = ((bool)(resources.GetObject("lblParty.Enabled")));
            this.lblParty.Font = ((System.Drawing.Font)(resources.GetObject("lblParty.Font")));
            this.lblParty.Image = ((System.Drawing.Image)(resources.GetObject("lblParty.Image")));
            this.lblParty.ImageAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("lblParty.ImageAlign")));
            this.lblParty.ImageIndex = ((int)(resources.GetObject("lblParty.ImageIndex")));
            this.lblParty.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("lblParty.ImeMode")));
            this.lblParty.Location = ((System.Drawing.Point)(resources.GetObject("lblParty.Location")));
            this.lblParty.Name = "lblParty";
            this.lblParty.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("lblParty.RightToLeft")));
            this.lblParty.Size = ((System.Drawing.Size)(resources.GetObject("lblParty.Size")));
            this.lblParty.TabIndex = ((int)(resources.GetObject("lblParty.TabIndex")));
            this.lblParty.Text = resources.GetString("lblParty.Text");
            this.lblParty.TextAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("lblParty.TextAlign")));
            this.lblParty.Visible = ((bool)(resources.GetObject("lblParty.Visible")));
            // 
            // btnParty
            // 
            this.btnParty.AccessibleDescription = resources.GetString("btnParty.AccessibleDescription");
            this.btnParty.AccessibleName = resources.GetString("btnParty.AccessibleName");
            this.btnParty.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("btnParty.Anchor")));
            this.btnParty.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("btnParty.BackgroundImage")));
            this.btnParty.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("btnParty.Dock")));
            this.btnParty.Enabled = ((bool)(resources.GetObject("btnParty.Enabled")));
            this.btnParty.FlatStyle = ((System.Windows.Forms.FlatStyle)(resources.GetObject("btnParty.FlatStyle")));
            this.btnParty.Font = ((System.Drawing.Font)(resources.GetObject("btnParty.Font")));
            this.btnParty.Image = ((System.Drawing.Image)(resources.GetObject("btnParty.Image")));
            this.btnParty.ImageAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("btnParty.ImageAlign")));
            this.btnParty.ImageIndex = ((int)(resources.GetObject("btnParty.ImageIndex")));
            this.btnParty.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("btnParty.ImeMode")));
            this.btnParty.Location = ((System.Drawing.Point)(resources.GetObject("btnParty.Location")));
            this.btnParty.Name = "btnParty";
            this.btnParty.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("btnParty.RightToLeft")));
            this.btnParty.Size = ((System.Drawing.Size)(resources.GetObject("btnParty.Size")));
            this.btnParty.TabIndex = ((int)(resources.GetObject("btnParty.TabIndex")));
            this.btnParty.Text = resources.GetString("btnParty.Text");
            this.btnParty.TextAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("btnParty.TextAlign")));
            this.btnParty.Visible = ((bool)(resources.GetObject("btnParty.Visible")));
            this.btnParty.Click += new System.EventHandler(this.btnParty_Click);
            // 
            // txtParty
            // 
            this.txtParty.AccessibleDescription = resources.GetString("txtParty.AccessibleDescription");
            this.txtParty.AccessibleName = resources.GetString("txtParty.AccessibleName");
            this.txtParty.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("txtParty.Anchor")));
            this.txtParty.AutoSize = ((bool)(resources.GetObject("txtParty.AutoSize")));
            this.txtParty.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("txtParty.BackgroundImage")));
            this.txtParty.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("txtParty.Dock")));
            this.txtParty.Enabled = ((bool)(resources.GetObject("txtParty.Enabled")));
            this.txtParty.Font = ((System.Drawing.Font)(resources.GetObject("txtParty.Font")));
            this.txtParty.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("txtParty.ImeMode")));
            this.txtParty.Location = ((System.Drawing.Point)(resources.GetObject("txtParty.Location")));
            this.txtParty.MaxLength = ((int)(resources.GetObject("txtParty.MaxLength")));
            this.txtParty.Multiline = ((bool)(resources.GetObject("txtParty.Multiline")));
            this.txtParty.Name = "txtParty";
            this.txtParty.PasswordChar = ((char)(resources.GetObject("txtParty.PasswordChar")));
            this.txtParty.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("txtParty.RightToLeft")));
            this.txtParty.ScrollBars = ((System.Windows.Forms.ScrollBars)(resources.GetObject("txtParty.ScrollBars")));
            this.txtParty.Size = ((System.Drawing.Size)(resources.GetObject("txtParty.Size")));
            this.txtParty.TabIndex = ((int)(resources.GetObject("txtParty.TabIndex")));
            this.txtParty.Text = resources.GetString("txtParty.Text");
            this.txtParty.TextAlign = ((System.Windows.Forms.HorizontalAlignment)(resources.GetObject("txtParty.TextAlign")));
            this.txtParty.Visible = ((bool)(resources.GetObject("txtParty.Visible")));
            this.txtParty.WordWrap = ((bool)(resources.GetObject("txtParty.WordWrap")));
            this.txtParty.KeyDown += new System.Windows.Forms.KeyEventHandler(this.txtParty_KeyDown);
            this.txtParty.Validating += new System.ComponentModel.CancelEventHandler(this.txtParty_Validating);
            // 
            // btnAdd
            // 
            this.btnAdd.AccessibleDescription = resources.GetString("btnAdd.AccessibleDescription");
            this.btnAdd.AccessibleName = resources.GetString("btnAdd.AccessibleName");
            this.btnAdd.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("btnAdd.Anchor")));
            this.btnAdd.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("btnAdd.BackgroundImage")));
            this.btnAdd.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("btnAdd.Dock")));
            this.btnAdd.Enabled = ((bool)(resources.GetObject("btnAdd.Enabled")));
            this.btnAdd.FlatStyle = ((System.Windows.Forms.FlatStyle)(resources.GetObject("btnAdd.FlatStyle")));
            this.btnAdd.Font = ((System.Drawing.Font)(resources.GetObject("btnAdd.Font")));
            this.btnAdd.Image = ((System.Drawing.Image)(resources.GetObject("btnAdd.Image")));
            this.btnAdd.ImageAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("btnAdd.ImageAlign")));
            this.btnAdd.ImageIndex = ((int)(resources.GetObject("btnAdd.ImageIndex")));
            this.btnAdd.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("btnAdd.ImeMode")));
            this.btnAdd.Location = ((System.Drawing.Point)(resources.GetObject("btnAdd.Location")));
            this.btnAdd.Name = "btnAdd";
            this.btnAdd.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("btnAdd.RightToLeft")));
            this.btnAdd.Size = ((System.Drawing.Size)(resources.GetObject("btnAdd.Size")));
            this.btnAdd.TabIndex = ((int)(resources.GetObject("btnAdd.TabIndex")));
            this.btnAdd.Text = resources.GetString("btnAdd.Text");
            this.btnAdd.TextAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("btnAdd.TextAlign")));
            this.btnAdd.Visible = ((bool)(resources.GetObject("btnAdd.Visible")));
            this.btnAdd.Click += new System.EventHandler(this.btnAdd_Click);
            // 
            // btnSave
            // 
            this.btnSave.AccessibleDescription = resources.GetString("btnSave.AccessibleDescription");
            this.btnSave.AccessibleName = resources.GetString("btnSave.AccessibleName");
            this.btnSave.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("btnSave.Anchor")));
            this.btnSave.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("btnSave.BackgroundImage")));
            this.btnSave.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("btnSave.Dock")));
            this.btnSave.Enabled = ((bool)(resources.GetObject("btnSave.Enabled")));
            this.btnSave.FlatStyle = ((System.Windows.Forms.FlatStyle)(resources.GetObject("btnSave.FlatStyle")));
            this.btnSave.Font = ((System.Drawing.Font)(resources.GetObject("btnSave.Font")));
            this.btnSave.Image = ((System.Drawing.Image)(resources.GetObject("btnSave.Image")));
            this.btnSave.ImageAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("btnSave.ImageAlign")));
            this.btnSave.ImageIndex = ((int)(resources.GetObject("btnSave.ImageIndex")));
            this.btnSave.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("btnSave.ImeMode")));
            this.btnSave.Location = ((System.Drawing.Point)(resources.GetObject("btnSave.Location")));
            this.btnSave.Name = "btnSave";
            this.btnSave.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("btnSave.RightToLeft")));
            this.btnSave.Size = ((System.Drawing.Size)(resources.GetObject("btnSave.Size")));
            this.btnSave.TabIndex = ((int)(resources.GetObject("btnSave.TabIndex")));
            this.btnSave.Text = resources.GetString("btnSave.Text");
            this.btnSave.TextAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("btnSave.TextAlign")));
            this.btnSave.Visible = ((bool)(resources.GetObject("btnSave.Visible")));
            this.btnSave.Click += new System.EventHandler(this.btnSave_Click);
            // 
            // btnPrint
            // 
            this.btnPrint.AccessibleDescription = resources.GetString("btnPrint.AccessibleDescription");
            this.btnPrint.AccessibleName = resources.GetString("btnPrint.AccessibleName");
            this.btnPrint.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("btnPrint.Anchor")));
            this.btnPrint.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("btnPrint.BackgroundImage")));
            this.btnPrint.DialogResult = System.Windows.Forms.DialogResult.Cancel;
            this.btnPrint.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("btnPrint.Dock")));
            this.btnPrint.Enabled = ((bool)(resources.GetObject("btnPrint.Enabled")));
            this.btnPrint.FlatStyle = ((System.Windows.Forms.FlatStyle)(resources.GetObject("btnPrint.FlatStyle")));
            this.btnPrint.Font = ((System.Drawing.Font)(resources.GetObject("btnPrint.Font")));
            this.btnPrint.Image = ((System.Drawing.Image)(resources.GetObject("btnPrint.Image")));
            this.btnPrint.ImageAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("btnPrint.ImageAlign")));
            this.btnPrint.ImageIndex = ((int)(resources.GetObject("btnPrint.ImageIndex")));
            this.btnPrint.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("btnPrint.ImeMode")));
            this.btnPrint.Location = ((System.Drawing.Point)(resources.GetObject("btnPrint.Location")));
            this.btnPrint.Name = "btnPrint";
            this.btnPrint.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("btnPrint.RightToLeft")));
            this.btnPrint.Size = ((System.Drawing.Size)(resources.GetObject("btnPrint.Size")));
            this.btnPrint.TabIndex = ((int)(resources.GetObject("btnPrint.TabIndex")));
            this.btnPrint.Text = resources.GetString("btnPrint.Text");
            this.btnPrint.TextAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("btnPrint.TextAlign")));
            this.btnPrint.Visible = ((bool)(resources.GetObject("btnPrint.Visible")));
            this.btnPrint.Click += new System.EventHandler(this.btnPrint_Click);
            // 
            // dtmPostDate
            // 
            this.dtmPostDate.AcceptsEscape = ((bool)(resources.GetObject("dtmPostDate.AcceptsEscape")));
            this.dtmPostDate.AccessibleDescription = resources.GetString("dtmPostDate.AccessibleDescription");
            this.dtmPostDate.AccessibleName = resources.GetString("dtmPostDate.AccessibleName");
            this.dtmPostDate.ValueIsDbNull = false;
            this.dtmPostDate.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("dtmPostDate.Anchor")));
            this.dtmPostDate.AutoSize = ((bool)(resources.GetObject("dtmPostDate.AutoSize")));
            this.dtmPostDate.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("dtmPostDate.BackgroundImage")));
            this.dtmPostDate.BorderStyle = ((System.Windows.Forms.BorderStyle)(resources.GetObject("dtmPostDate.BorderStyle")));
            // 
            // dtmPostDate.Calendar
            // 
            this.dtmPostDate.Calendar.AccessibleDescription = resources.GetString("dtmPostDate.Calendar.AccessibleDescription");
            this.dtmPostDate.Calendar.AccessibleName = resources.GetString("dtmPostDate.Calendar.AccessibleName");
            this.dtmPostDate.Calendar.AnnuallyBoldedDates = ((System.DateTime[])(resources.GetObject("dtmPostDate.Calendar.AnnuallyBoldedDates")));
            this.dtmPostDate.Calendar.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("dtmPostDate.Calendar.BackgroundImage")));
            this.dtmPostDate.Calendar.BoldedDates = ((System.DateTime[])(resources.GetObject("dtmPostDate.Calendar.BoldedDates")));
            this.dtmPostDate.Calendar.CalendarDimensions = ((System.Drawing.Size)(resources.GetObject("dtmPostDate.Calendar.CalendarDimensions")));
            this.dtmPostDate.Calendar.Enabled = ((bool)(resources.GetObject("dtmPostDate.Calendar.Enabled")));
            this.dtmPostDate.Calendar.FirstDayOfWeek = ((System.Windows.Forms.Day)(resources.GetObject("dtmPostDate.Calendar.FirstDayOfWeek")));
            this.dtmPostDate.Calendar.Font = ((System.Drawing.Font)(resources.GetObject("dtmPostDate.Calendar.Font")));
            this.dtmPostDate.Calendar.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("dtmPostDate.Calendar.ImeMode")));
            this.dtmPostDate.Calendar.MaxDate = new System.DateTime(2100, 12, 31, 0, 0, 0, 0);
            this.dtmPostDate.Calendar.MonthlyBoldedDates = ((System.DateTime[])(resources.GetObject("dtmPostDate.Calendar.MonthlyBoldedDates")));
            this.dtmPostDate.Calendar.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("dtmPostDate.Calendar.RightToLeft")));
            this.dtmPostDate.Calendar.ShowClearButton = ((bool)(resources.GetObject("dtmPostDate.Calendar.ShowClearButton")));
            this.dtmPostDate.Calendar.ShowTodayButton = ((bool)(resources.GetObject("dtmPostDate.Calendar.ShowTodayButton")));
            this.dtmPostDate.Calendar.ShowWeekNumbers = ((bool)(resources.GetObject("dtmPostDate.Calendar.ShowWeekNumbers")));
            this.dtmPostDate.CaseSensitive = ((bool)(resources.GetObject("dtmPostDate.CaseSensitive")));
            this.dtmPostDate.Culture = ((int)(resources.GetObject("dtmPostDate.Culture")));
            this.dtmPostDate.CurrentTimeZone = ((bool)(resources.GetObject("dtmPostDate.CurrentTimeZone")));
            this.dtmPostDate.CustomFormat = resources.GetString("dtmPostDate.CustomFormat");
            this.dtmPostDate.DaylightTimeAdjustment = ((C1.Win.C1Input.DaylightTimeAdjustmentEnum)(resources.GetObject("dtmPostDate.DaylightTimeAdjustment")));
            this.dtmPostDate.DisplayFormat.CustomFormat = resources.GetString("dtmPostDate.DisplayFormat.CustomFormat");
            this.dtmPostDate.DisplayFormat.FormatType = ((C1.Win.C1Input.FormatTypeEnum)(resources.GetObject("dtmPostDate.DisplayFormat.FormatType")));
            this.dtmPostDate.DisplayFormat.Inherit = ((C1.Win.C1Input.FormatInfoInheritFlags)(resources.GetObject("dtmPostDate.DisplayFormat.Inherit")));
            this.dtmPostDate.DisplayFormat.NullText = resources.GetString("dtmPostDate.DisplayFormat.NullText");
            this.dtmPostDate.DisplayFormat.TrimEnd = ((bool)(resources.GetObject("dtmPostDate.DisplayFormat.TrimEnd")));
            this.dtmPostDate.DisplayFormat.TrimStart = ((bool)(resources.GetObject("dtmPostDate.DisplayFormat.TrimStart")));
            this.dtmPostDate.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("dtmPostDate.Dock")));
            this.dtmPostDate.DropDownFormAlign = ((C1.Win.C1Input.DropDownFormAlignmentEnum)(resources.GetObject("dtmPostDate.DropDownFormAlign")));
            this.dtmPostDate.EditFormat.CustomFormat = resources.GetString("dtmPostDate.EditFormat.CustomFormat");
            this.dtmPostDate.EditFormat.FormatType = ((C1.Win.C1Input.FormatTypeEnum)(resources.GetObject("dtmPostDate.EditFormat.FormatType")));
            this.dtmPostDate.EditFormat.Inherit = ((C1.Win.C1Input.FormatInfoInheritFlags)(resources.GetObject("dtmPostDate.EditFormat.Inherit")));
            this.dtmPostDate.EditFormat.NullText = resources.GetString("dtmPostDate.EditFormat.NullText");
            this.dtmPostDate.EditFormat.TrimEnd = ((bool)(resources.GetObject("dtmPostDate.EditFormat.TrimEnd")));
            this.dtmPostDate.EditFormat.TrimStart = ((bool)(resources.GetObject("dtmPostDate.EditFormat.TrimStart")));
            this.dtmPostDate.EditMask = resources.GetString("dtmPostDate.EditMask");
            this.dtmPostDate.EmptyAsNull = ((bool)(resources.GetObject("dtmPostDate.EmptyAsNull")));
            this.dtmPostDate.Enabled = ((bool)(resources.GetObject("dtmPostDate.Enabled")));
            this.dtmPostDate.ErrorInfo.BeepOnError = ((bool)(resources.GetObject("dtmPostDate.ErrorInfo.BeepOnError")));
            this.dtmPostDate.ErrorInfo.ErrorMessage = resources.GetString("dtmPostDate.ErrorInfo.ErrorMessage");
            this.dtmPostDate.ErrorInfo.ErrorMessageCaption = resources.GetString("dtmPostDate.ErrorInfo.ErrorMessageCaption");
            this.dtmPostDate.ErrorInfo.ShowErrorMessage = ((bool)(resources.GetObject("dtmPostDate.ErrorInfo.ShowErrorMessage")));
            this.dtmPostDate.ErrorInfo.ValueOnError = ((object)(resources.GetObject("dtmPostDate.ErrorInfo.ValueOnError")));
            this.dtmPostDate.Font = ((System.Drawing.Font)(resources.GetObject("dtmPostDate.Font")));
            this.dtmPostDate.FormatType = ((C1.Win.C1Input.FormatTypeEnum)(resources.GetObject("dtmPostDate.FormatType")));
            this.dtmPostDate.GapHeight = ((int)(resources.GetObject("dtmPostDate.GapHeight")));
            this.dtmPostDate.GMTOffset = ((System.TimeSpan)(resources.GetObject("dtmPostDate.GMTOffset")));
            this.dtmPostDate.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("dtmPostDate.ImeMode")));
            this.dtmPostDate.InitialSelection = ((C1.Win.C1Input.InitialSelectionEnum)(resources.GetObject("dtmPostDate.InitialSelection")));
            this.dtmPostDate.Location = ((System.Drawing.Point)(resources.GetObject("dtmPostDate.Location")));
            this.dtmPostDate.MaskInfo.AutoTabWhenFilled = ((bool)(resources.GetObject("dtmPostDate.MaskInfo.AutoTabWhenFilled")));
            this.dtmPostDate.MaskInfo.CaseSensitive = ((bool)(resources.GetObject("dtmPostDate.MaskInfo.CaseSensitive")));
            this.dtmPostDate.MaskInfo.CopyWithLiterals = ((bool)(resources.GetObject("dtmPostDate.MaskInfo.CopyWithLiterals")));
            this.dtmPostDate.MaskInfo.EditMask = resources.GetString("dtmPostDate.MaskInfo.EditMask");
            this.dtmPostDate.MaskInfo.EmptyAsNull = ((bool)(resources.GetObject("dtmPostDate.MaskInfo.EmptyAsNull")));
            this.dtmPostDate.MaskInfo.ErrorMessage = resources.GetString("dtmPostDate.MaskInfo.ErrorMessage");
            this.dtmPostDate.MaskInfo.Inherit = ((C1.Win.C1Input.MaskInfoInheritFlags)(resources.GetObject("dtmPostDate.MaskInfo.Inherit")));
            this.dtmPostDate.MaskInfo.PromptChar = ((char)(resources.GetObject("dtmPostDate.MaskInfo.PromptChar")));
            this.dtmPostDate.MaskInfo.ShowLiterals = ((C1.Win.C1Input.ShowLiteralsEnum)(resources.GetObject("dtmPostDate.MaskInfo.ShowLiterals")));
            this.dtmPostDate.MaskInfo.StoredEmptyChar = ((char)(resources.GetObject("dtmPostDate.MaskInfo.StoredEmptyChar")));
            this.dtmPostDate.MaxLength = ((int)(resources.GetObject("dtmPostDate.MaxLength")));
            this.dtmPostDate.Name = "dtmPostDate";
            this.dtmPostDate.NullText = resources.GetString("dtmPostDate.NullText");
            this.dtmPostDate.ParseInfo.CaseSensitive = ((bool)(resources.GetObject("dtmPostDate.ParseInfo.CaseSensitive")));
            this.dtmPostDate.ParseInfo.CustomFormat = resources.GetString("dtmPostDate.ParseInfo.CustomFormat");
            this.dtmPostDate.ParseInfo.DateTimeStyle = ((C1.Win.C1Input.DateTimeStyleFlags)(resources.GetObject("dtmPostDate.ParseInfo.DateTimeStyle")));
            this.dtmPostDate.ParseInfo.EmptyAsNull = ((bool)(resources.GetObject("dtmPostDate.ParseInfo.EmptyAsNull")));
            this.dtmPostDate.ParseInfo.ErrorMessage = resources.GetString("dtmPostDate.ParseInfo.ErrorMessage");
            this.dtmPostDate.ParseInfo.FormatType = ((C1.Win.C1Input.FormatTypeEnum)(resources.GetObject("dtmPostDate.ParseInfo.FormatType")));
            this.dtmPostDate.ParseInfo.Inherit = ((C1.Win.C1Input.ParseInfoInheritFlags)(resources.GetObject("dtmPostDate.ParseInfo.Inherit")));
            this.dtmPostDate.ParseInfo.NullText = resources.GetString("dtmPostDate.ParseInfo.NullText");
            this.dtmPostDate.ParseInfo.TrimEnd = ((bool)(resources.GetObject("dtmPostDate.ParseInfo.TrimEnd")));
            this.dtmPostDate.ParseInfo.TrimStart = ((bool)(resources.GetObject("dtmPostDate.ParseInfo.TrimStart")));
            this.dtmPostDate.PasswordChar = ((char)(resources.GetObject("dtmPostDate.PasswordChar")));
            this.dtmPostDate.PostValidation.CaseSensitive = ((bool)(resources.GetObject("dtmPostDate.PostValidation.CaseSensitive")));
            this.dtmPostDate.PostValidation.ErrorMessage = resources.GetString("dtmPostDate.PostValidation.ErrorMessage");
            this.dtmPostDate.PostValidation.Inherit = ((C1.Win.C1Input.PostValidationInheritFlags)(resources.GetObject("dtmPostDate.PostValidation.Inherit")));
            this.dtmPostDate.PostValidation.Intervals.AddRange(new C1.Win.C1Input.ValueInterval[] {
																									  ((C1.Win.C1Input.ValueInterval)(resources.GetObject("dtmPostDate.PostValidation.Intervals")))});
            this.dtmPostDate.PostValidation.Validation = ((C1.Win.C1Input.PostValidationTypeEnum)(resources.GetObject("dtmPostDate.PostValidation.Validation")));
            this.dtmPostDate.PostValidation.Values = ((System.Array)(resources.GetObject("dtmPostDate.PostValidation.Values")));
            this.dtmPostDate.PostValidation.ValuesExcluded = ((System.Array)(resources.GetObject("dtmPostDate.PostValidation.ValuesExcluded")));
            this.dtmPostDate.PreValidation.CaseSensitive = ((bool)(resources.GetObject("dtmPostDate.PreValidation.CaseSensitive")));
            this.dtmPostDate.PreValidation.ErrorMessage = resources.GetString("dtmPostDate.PreValidation.ErrorMessage");
            this.dtmPostDate.PreValidation.Inherit = ((C1.Win.C1Input.PreValidationInheritFlags)(resources.GetObject("dtmPostDate.PreValidation.Inherit")));
            this.dtmPostDate.PreValidation.ItemSeparator = resources.GetString("dtmPostDate.PreValidation.ItemSeparator");
            this.dtmPostDate.PreValidation.PatternString = resources.GetString("dtmPostDate.PreValidation.PatternString");
            this.dtmPostDate.PreValidation.RegexOptions = ((C1.Win.C1Input.RegexOptionFlags)(resources.GetObject("dtmPostDate.PreValidation.RegexOptions")));
            this.dtmPostDate.PreValidation.TrimEnd = ((bool)(resources.GetObject("dtmPostDate.PreValidation.TrimEnd")));
            this.dtmPostDate.PreValidation.TrimStart = ((bool)(resources.GetObject("dtmPostDate.PreValidation.TrimStart")));
            this.dtmPostDate.PreValidation.Validation = ((C1.Win.C1Input.PreValidationTypeEnum)(resources.GetObject("dtmPostDate.PreValidation.Validation")));
            this.dtmPostDate.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("dtmPostDate.RightToLeft")));
            this.dtmPostDate.ShowFocusRectangle = ((bool)(resources.GetObject("dtmPostDate.ShowFocusRectangle")));
            this.dtmPostDate.Size = ((System.Drawing.Size)(resources.GetObject("dtmPostDate.Size")));
            this.dtmPostDate.TabIndex = ((int)(resources.GetObject("dtmPostDate.TabIndex")));
            this.dtmPostDate.Tag = ((object)(resources.GetObject("dtmPostDate.Tag")));
            this.dtmPostDate.TextAlign = ((System.Windows.Forms.HorizontalAlignment)(resources.GetObject("dtmPostDate.TextAlign")));
            this.dtmPostDate.TrimEnd = ((bool)(resources.GetObject("dtmPostDate.TrimEnd")));
            this.dtmPostDate.TrimStart = ((bool)(resources.GetObject("dtmPostDate.TrimStart")));
            this.dtmPostDate.UserCultureOverride = ((bool)(resources.GetObject("dtmPostDate.UserCultureOverride")));
            this.dtmPostDate.Value = ((object)(resources.GetObject("dtmPostDate.Value")));
            this.dtmPostDate.VerticalAlign = ((C1.Win.C1Input.VerticalAlignEnum)(resources.GetObject("dtmPostDate.VerticalAlign")));
            this.dtmPostDate.Visible = ((bool)(resources.GetObject("dtmPostDate.Visible")));
            this.dtmPostDate.VisibleButtons = ((C1.Win.C1Input.DropDownControlButtonFlags)(resources.GetObject("dtmPostDate.VisibleButtons")));
            this.dtmPostDate.Validating += new System.ComponentModel.CancelEventHandler(this.dtmPostDate_Validating);
            this.dtmPostDate.DropDownClosed += new DropDownClosedEventHandler(this.dtmPostDate_DropDownClosed);
            // 
            // cboCCN
            // 
            this.cboCCN.AccessibleDescription = resources.GetString("cboCCN.AccessibleDescription");
            this.cboCCN.AccessibleName = resources.GetString("cboCCN.AccessibleName");
            this.cboCCN.AddItemSeparator = ';';
            this.cboCCN.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("cboCCN.Anchor")));
            this.cboCCN.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("cboCCN.BackgroundImage")));
            this.cboCCN.Caption = "";
            this.cboCCN.CaptionHeight = 17;
            this.cboCCN.CharacterCasing = System.Windows.Forms.CharacterCasing.Normal;
            this.cboCCN.ColumnCaptionHeight = 17;
            this.cboCCN.ColumnFooterHeight = 17;
            this.cboCCN.ComboStyle = C1.Win.C1List.ComboStyleEnum.DropdownList;
            this.cboCCN.ContentHeight = 15;
            this.cboCCN.DeadAreaBackColor = System.Drawing.Color.Empty;
            this.cboCCN.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("cboCCN.Dock")));
            this.cboCCN.EditorBackColor = System.Drawing.SystemColors.Window;
            this.cboCCN.EditorFont = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
            this.cboCCN.EditorForeColor = System.Drawing.SystemColors.WindowText;
            this.cboCCN.EditorHeight = 15;
            this.cboCCN.Enabled = ((bool)(resources.GetObject("cboCCN.Enabled")));
            this.cboCCN.FlatStyle = C1.Win.C1List.FlatModeEnum.System;
            this.cboCCN.Font = ((System.Drawing.Font)(resources.GetObject("cboCCN.Font")));
            this.cboCCN.GapHeight = 2;
            this.cboCCN.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("cboCCN.ImeMode")));
            this.cboCCN.ItemHeight = 15;
            this.cboCCN.Location = ((System.Drawing.Point)(resources.GetObject("cboCCN.Location")));
            this.cboCCN.MatchEntryTimeout = ((long)(2000));
            this.cboCCN.MaxDropDownItems = ((short)(5));
            this.cboCCN.MaxLength = 32767;
            this.cboCCN.MouseCursor = System.Windows.Forms.Cursors.Default;
            this.cboCCN.Name = "cboCCN";
            this.cboCCN.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("cboCCN.RightToLeft")));
            this.cboCCN.RowDivider.Color = System.Drawing.Color.DarkGray;
            this.cboCCN.RowDivider.Style = C1.Win.C1List.LineStyleEnum.None;
            this.cboCCN.RowSubDividerColor = System.Drawing.Color.DarkGray;
            this.cboCCN.Size = ((System.Drawing.Size)(resources.GetObject("cboCCN.Size")));
            this.cboCCN.TabIndex = ((int)(resources.GetObject("cboCCN.TabIndex")));
            this.cboCCN.Text = resources.GetString("cboCCN.Text");
            this.cboCCN.Visible = ((bool)(resources.GetObject("cboCCN.Visible")));
            this.cboCCN.PropBag = "<?xml version=\"1.0\"?><Blob><Styles type=\"C1.Win.C1List.Design.ContextWrapper\"><Da" +
                "ta>Group{AlignVert:Center;Border:None,,0, 0, 0, 0;BackColor:ControlDark;}Style2{" +
                "}Style5{}Style4{}Style7{}Style6{}EvenRow{BackColor:Aqua;}Selected{ForeColor:High" +
                "lightText;BackColor:Highlight;}Style3{}Inactive{ForeColor:InactiveCaptionText;Ba" +
                "ckColor:InactiveCaption;}Footer{}Caption{AlignHorz:Center;}Normal{BackColor:Wind" +
                "ow;}HighlightRow{ForeColor:HighlightText;BackColor:Highlight;}Style1{}OddRow{}Re" +
                "cordSelector{AlignImage:Center;}Heading{Wrap:True;BackColor:Control;Border:Raise" +
                "d,,1, 1, 1, 1;ForeColor:ControlText;AlignVert:Center;}Style8{}Style10{}Style11{}" +
                "Style9{AlignHorz:Near;}</Data></Styles><Splits><C1.Win.C1List.ListBoxView AllowC" +
                "olSelect=\"False\" Name=\"\" CaptionHeight=\"17\" ColumnCaptionHeight=\"17\" ColumnFoote" +
                "rHeight=\"17\" VerticalScrollGroup=\"1\" HorizontalScrollGroup=\"1\"><ClientRect>0, 0," +
                " 118, 158</ClientRect><VScrollBar><Width>16</Width></VScrollBar><HScrollBar><Hei" +
                "ght>16</Height></HScrollBar><CaptionStyle parent=\"Style2\" me=\"Style9\" /><EvenRow" +
                "Style parent=\"EvenRow\" me=\"Style7\" /><FooterStyle parent=\"Footer\" me=\"Style3\" />" +
                "<GroupStyle parent=\"Group\" me=\"Style11\" /><HeadingStyle parent=\"Heading\" me=\"Sty" +
                "le2\" /><HighLightRowStyle parent=\"HighlightRow\" me=\"Style6\" /><InactiveStyle par" +
                "ent=\"Inactive\" me=\"Style4\" /><OddRowStyle parent=\"OddRow\" me=\"Style8\" /><RecordS" +
                "electorStyle parent=\"RecordSelector\" me=\"Style10\" /><SelectedStyle parent=\"Selec" +
                "ted\" me=\"Style5\" /><Style parent=\"Normal\" me=\"Style1\" /></C1.Win.C1List.ListBoxV" +
                "iew></Splits><NamedStyles><Style parent=\"\" me=\"Normal\" /><Style parent=\"Normal\" " +
                "me=\"Heading\" /><Style parent=\"Heading\" me=\"Footer\" /><Style parent=\"Heading\" me=" +
                "\"Caption\" /><Style parent=\"Heading\" me=\"Inactive\" /><Style parent=\"Normal\" me=\"S" +
                "elected\" /><Style parent=\"Normal\" me=\"HighlightRow\" /><Style parent=\"Normal\" me=" +
                "\"EvenRow\" /><Style parent=\"Normal\" me=\"OddRow\" /><Style parent=\"Heading\" me=\"Rec" +
                "ordSelector\" /><Style parent=\"Caption\" me=\"Group\" /></NamedStyles><vertSplits>1<" +
                "/vertSplits><horzSplits>1</horzSplits><Layout>Modified</Layout><DefaultRecSelWid" +
                "th>17</DefaultRecSelWidth></Blob>";
            // 
            // txtPurpose
            // 
            this.txtPurpose.AccessibleDescription = resources.GetString("txtPurpose.AccessibleDescription");
            this.txtPurpose.AccessibleName = resources.GetString("txtPurpose.AccessibleName");
            this.txtPurpose.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("txtPurpose.Anchor")));
            this.txtPurpose.AutoSize = ((bool)(resources.GetObject("txtPurpose.AutoSize")));
            this.txtPurpose.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("txtPurpose.BackgroundImage")));
            this.txtPurpose.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("txtPurpose.Dock")));
            this.txtPurpose.Enabled = ((bool)(resources.GetObject("txtPurpose.Enabled")));
            this.txtPurpose.Font = ((System.Drawing.Font)(resources.GetObject("txtPurpose.Font")));
            this.txtPurpose.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("txtPurpose.ImeMode")));
            this.txtPurpose.Location = ((System.Drawing.Point)(resources.GetObject("txtPurpose.Location")));
            this.txtPurpose.MaxLength = ((int)(resources.GetObject("txtPurpose.MaxLength")));
            this.txtPurpose.Multiline = ((bool)(resources.GetObject("txtPurpose.Multiline")));
            this.txtPurpose.Name = "txtPurpose";
            this.txtPurpose.PasswordChar = ((char)(resources.GetObject("txtPurpose.PasswordChar")));
            this.txtPurpose.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("txtPurpose.RightToLeft")));
            this.txtPurpose.ScrollBars = ((System.Windows.Forms.ScrollBars)(resources.GetObject("txtPurpose.ScrollBars")));
            this.txtPurpose.Size = ((System.Drawing.Size)(resources.GetObject("txtPurpose.Size")));
            this.txtPurpose.TabIndex = ((int)(resources.GetObject("txtPurpose.TabIndex")));
            this.txtPurpose.Text = resources.GetString("txtPurpose.Text");
            this.txtPurpose.TextAlign = ((System.Windows.Forms.HorizontalAlignment)(resources.GetObject("txtPurpose.TextAlign")));
            this.txtPurpose.Visible = ((bool)(resources.GetObject("txtPurpose.Visible")));
            this.txtPurpose.WordWrap = ((bool)(resources.GetObject("txtPurpose.WordWrap")));
            this.txtPurpose.KeyDown += new System.Windows.Forms.KeyEventHandler(this.txtPurpose_KeyDown);
            this.txtPurpose.Validating += new System.ComponentModel.CancelEventHandler(this.txtPurpose_Validating);
            // 
            // btnPurpose
            // 
            this.btnPurpose.AccessibleDescription = resources.GetString("btnPurpose.AccessibleDescription");
            this.btnPurpose.AccessibleName = resources.GetString("btnPurpose.AccessibleName");
            this.btnPurpose.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("btnPurpose.Anchor")));
            this.btnPurpose.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("btnPurpose.BackgroundImage")));
            this.btnPurpose.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("btnPurpose.Dock")));
            this.btnPurpose.Enabled = ((bool)(resources.GetObject("btnPurpose.Enabled")));
            this.btnPurpose.FlatStyle = ((System.Windows.Forms.FlatStyle)(resources.GetObject("btnPurpose.FlatStyle")));
            this.btnPurpose.Font = ((System.Drawing.Font)(resources.GetObject("btnPurpose.Font")));
            this.btnPurpose.Image = ((System.Drawing.Image)(resources.GetObject("btnPurpose.Image")));
            this.btnPurpose.ImageAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("btnPurpose.ImageAlign")));
            this.btnPurpose.ImageIndex = ((int)(resources.GetObject("btnPurpose.ImageIndex")));
            this.btnPurpose.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("btnPurpose.ImeMode")));
            this.btnPurpose.Location = ((System.Drawing.Point)(resources.GetObject("btnPurpose.Location")));
            this.btnPurpose.Name = "btnPurpose";
            this.btnPurpose.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("btnPurpose.RightToLeft")));
            this.btnPurpose.Size = ((System.Drawing.Size)(resources.GetObject("btnPurpose.Size")));
            this.btnPurpose.TabIndex = ((int)(resources.GetObject("btnPurpose.TabIndex")));
            this.btnPurpose.Text = resources.GetString("btnPurpose.Text");
            this.btnPurpose.TextAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("btnPurpose.TextAlign")));
            this.btnPurpose.Visible = ((bool)(resources.GetObject("btnPurpose.Visible")));
            this.btnPurpose.Click += new System.EventHandler(this.btnPurpose_Click);
            // 
            // lblPurpose
            // 
            this.lblPurpose.AccessibleDescription = resources.GetString("lblPurpose.AccessibleDescription");
            this.lblPurpose.AccessibleName = resources.GetString("lblPurpose.AccessibleName");
            this.lblPurpose.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("lblPurpose.Anchor")));
            this.lblPurpose.AutoSize = ((bool)(resources.GetObject("lblPurpose.AutoSize")));
            this.lblPurpose.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("lblPurpose.Dock")));
            this.lblPurpose.Enabled = ((bool)(resources.GetObject("lblPurpose.Enabled")));
            this.lblPurpose.Font = ((System.Drawing.Font)(resources.GetObject("lblPurpose.Font")));
            this.lblPurpose.ForeColor = System.Drawing.Color.Maroon;
            this.lblPurpose.Image = ((System.Drawing.Image)(resources.GetObject("lblPurpose.Image")));
            this.lblPurpose.ImageAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("lblPurpose.ImageAlign")));
            this.lblPurpose.ImageIndex = ((int)(resources.GetObject("lblPurpose.ImageIndex")));
            this.lblPurpose.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("lblPurpose.ImeMode")));
            this.lblPurpose.Location = ((System.Drawing.Point)(resources.GetObject("lblPurpose.Location")));
            this.lblPurpose.Name = "lblPurpose";
            this.lblPurpose.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("lblPurpose.RightToLeft")));
            this.lblPurpose.Size = ((System.Drawing.Size)(resources.GetObject("lblPurpose.Size")));
            this.lblPurpose.TabIndex = ((int)(resources.GetObject("lblPurpose.TabIndex")));
            this.lblPurpose.Text = resources.GetString("lblPurpose.Text");
            this.lblPurpose.TextAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("lblPurpose.TextAlign")));
            this.lblPurpose.Visible = ((bool)(resources.GetObject("lblPurpose.Visible")));
            // 
            // btnDelete
            // 
            this.btnDelete.AccessibleDescription = resources.GetString("btnDelete.AccessibleDescription");
            this.btnDelete.AccessibleName = resources.GetString("btnDelete.AccessibleName");
            this.btnDelete.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("btnDelete.Anchor")));
            this.btnDelete.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("btnDelete.BackgroundImage")));
            this.btnDelete.DialogResult = System.Windows.Forms.DialogResult.Cancel;
            this.btnDelete.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("btnDelete.Dock")));
            this.btnDelete.Enabled = ((bool)(resources.GetObject("btnDelete.Enabled")));
            this.btnDelete.FlatStyle = ((System.Windows.Forms.FlatStyle)(resources.GetObject("btnDelete.FlatStyle")));
            this.btnDelete.Font = ((System.Drawing.Font)(resources.GetObject("btnDelete.Font")));
            this.btnDelete.Image = ((System.Drawing.Image)(resources.GetObject("btnDelete.Image")));
            this.btnDelete.ImageAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("btnDelete.ImageAlign")));
            this.btnDelete.ImageIndex = ((int)(resources.GetObject("btnDelete.ImageIndex")));
            this.btnDelete.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("btnDelete.ImeMode")));
            this.btnDelete.Location = ((System.Drawing.Point)(resources.GetObject("btnDelete.Location")));
            this.btnDelete.Name = "btnDelete";
            this.btnDelete.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("btnDelete.RightToLeft")));
            this.btnDelete.Size = ((System.Drawing.Size)(resources.GetObject("btnDelete.Size")));
            this.btnDelete.TabIndex = ((int)(resources.GetObject("btnDelete.TabIndex")));
            this.btnDelete.Text = resources.GetString("btnDelete.Text");
            this.btnDelete.TextAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("btnDelete.TextAlign")));
            this.btnDelete.Visible = ((bool)(resources.GetObject("btnDelete.Visible")));
            this.btnDelete.Click += new System.EventHandler(this.btnDelete_Click);
            // 
            // IVMiscellaneousIssue
            // 
            this.AccessibleDescription = resources.GetString("$this.AccessibleDescription");
            this.AccessibleName = resources.GetString("$this.AccessibleName");
            this.AutoScaleBaseSize = ((System.Drawing.Size)(resources.GetObject("$this.AutoScaleBaseSize")));
            this.AutoScroll = ((bool)(resources.GetObject("$this.AutoScroll")));
            this.AutoScrollMargin = ((System.Drawing.Size)(resources.GetObject("$this.AutoScrollMargin")));
            this.AutoScrollMinSize = ((System.Drawing.Size)(resources.GetObject("$this.AutoScrollMinSize")));
            this.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("$this.BackgroundImage")));
            this.ClientSize = ((System.Drawing.Size)(resources.GetObject("$this.ClientSize")));
            this.Controls.Add(this.txtPurpose);
            this.Controls.Add(this.txtTransNo);
            this.Controls.Add(this.txtComment);
            this.Controls.Add(this.dgrdData);
            this.Controls.Add(this.btnDelete);
            this.Controls.Add(this.btnPurpose);
            this.Controls.Add(this.lblPurpose);
            this.Controls.Add(this.dtmPostDate);
            this.Controls.Add(this.cboCCN);
            this.Controls.Add(this.btnAdd);
            this.Controls.Add(this.btnSave);
            this.Controls.Add(this.btnPrint);
            this.Controls.Add(this.grbDestination);
            this.Controls.Add(this.btnTransNo);
            this.Controls.Add(this.lblTransNo);
            this.Controls.Add(this.btnClose);
            this.Controls.Add(this.btnHelp);
            this.Controls.Add(this.grbSource);
            this.Controls.Add(this.lblCCN);
            this.Controls.Add(this.lblComment);
            this.Controls.Add(this.lblPostDate);
            this.Enabled = ((bool)(resources.GetObject("$this.Enabled")));
            this.Font = ((System.Drawing.Font)(resources.GetObject("$this.Font")));
            this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
            this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
            this.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("$this.ImeMode")));
            this.KeyPreview = true;
            this.Location = ((System.Drawing.Point)(resources.GetObject("$this.Location")));
            this.MaximumSize = ((System.Drawing.Size)(resources.GetObject("$this.MaximumSize")));
            this.MinimumSize = ((System.Drawing.Size)(resources.GetObject("$this.MinimumSize")));
            this.Name = "IVMiscellaneousIssue";
            this.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("$this.RightToLeft")));
            this.StartPosition = ((System.Windows.Forms.FormStartPosition)(resources.GetObject("$this.StartPosition")));
            this.Text = resources.GetString("$this.Text");
            this.KeyDown += new System.Windows.Forms.KeyEventHandler(this.IVLocToLocTransfer_KeyDown);
            this.Closing += new System.ComponentModel.CancelEventHandler(this.IVLocToLocTransfer_Closing);
            this.Load += new System.EventHandler(this.IVLocToLocTransfer_Load);
            this.grbSource.ResumeLayout(false);
            ((System.ComponentModel.ISupportInitialize)(this.dgrdData)).EndInit();
            this.grbDestination.ResumeLayout(false);
            ((System.ComponentModel.ISupportInitialize)(this.dtmPostDate)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.cboCCN)).EndInit();
            this.ResumeLayout(false);

        }
        #endregion

        #region reporting
        /// <summary>
        /// Build and show Delivery To Outsourcing Slip Report
        /// </summary>
        /// <Author> Tuan TQ, 13 Mar, 2006</Author>
        private void ShowDelivery2OutsourcingReport(object sender, System.EventArgs e)
        {
            const string METHOD_NAME = THIS + ".ShowDelivery2OutsourcingReport()";
            try
            {

                const string MASTER_SUBREPORT_NAME = "Delivery2Outsourcing";
                const string DELIVERY_TO_OUTSOURCING_SLIP_REPORT = "Delivery2OutsourcingReport.xml";
                const string SUBREPORT_NAME = "SubDelivery2Outsourcing";
                const string REPORTFLD_TITLE = "fldTitle";

                const string MAX_ROWS = " 100 PERCENT ";
                const int ROWS_PER_PAGE = 10;
                const string APPLICATION_PATH = @"PCSMain\bin\Debug";

                const string REPORTFLD_COMPANY = "fldCompany";
                const string ROW_INDEX_FLD = "RowIndex";

                //un-used data column name
                const string ITEM_CODE_FLD = "ITM_ProductCode";
                const string ITEM_MODEL_FLD = "ITM_ProductRevision";
                const string ITEM_NAME_FLD = "ITM_ProductDescription";
                const string QUANTITY_FLD = "Quantity";
                const string STOCKUM_FLD = "StockUM";
                const string CATEGORY_FLD = "CategoryCode";

                //return if no record was selected
                if (txtTransNo.Tag == null)
                {
                    return;
                }

                var intMasterId = int.Parse(txtTransNo.Tag.ToString());
                if (intMasterId <= 0)
                {
                    return;
                }

                //Change cursor to wait status
                Cursor = Cursors.WaitCursor;

                C1PrintPreviewDialog printPreview = new C1PrintPreviewDialog();
                C1PrintPreviewDialogBO boDataReport = new C1PrintPreviewDialogBO();

                DataTable dtbResult;
                dtbResult = boDataReport.GetDelivery2OutsourcingData(intMasterId, MAX_ROWS);

                // Check data source
                if (dtbResult != null)
                {
                    for (int i = 0; i < dtbResult.Rows.Count; i++)
                    {
                        dtbResult.Rows[i][ROW_INDEX_FLD] = i + 1;
                    }

                    //Prepare data for blank row
                    DataRow drowSourceBlankRow = dtbResult.NewRow();
                    if (dtbResult.Rows.Count > 0)
                    {
                        //Copy data
                        for (int colIndex = 0; colIndex < dtbResult.Columns.Count; colIndex++)
                        {
                            drowSourceBlankRow[colIndex] = dtbResult.Rows[0][colIndex];
                        }

                        //Clear value of un-used column
                        drowSourceBlankRow[ROW_INDEX_FLD] = DBNull.Value;
                        drowSourceBlankRow[ITEM_CODE_FLD] = DBNull.Value;
                        drowSourceBlankRow[ITEM_MODEL_FLD] = DBNull.Value;
                        drowSourceBlankRow[ITEM_NAME_FLD] = DBNull.Value;
                        drowSourceBlankRow[QUANTITY_FLD] = DBNull.Value;
                        drowSourceBlankRow[CATEGORY_FLD] = DBNull.Value;
                        drowSourceBlankRow[STOCKUM_FLD] = DBNull.Value;
                    }

                    //Append blank rows to enough MAX_ROWS
                    int intTotalLackRows = ROWS_PER_PAGE - dtbResult.Rows.Count % ROWS_PER_PAGE;
                    for (int i = 1; i <= intTotalLackRows; i++)
                    {
                        //Create new blank row
                        DataRow drowBlank = dtbResult.NewRow();

                        //Copy data
                        for (int colIndex = 0; colIndex < dtbResult.Columns.Count; colIndex++)
                        {
                            drowBlank[colIndex] = drowSourceBlankRow[colIndex];
                        }

                        dtbResult.Rows.Add(drowBlank);
                    }
                }

                ReportWithSubReportBuilder reportBuilder = new ReportWithSubReportBuilder();

                //Get actual application path
                string strReportPath = Application.StartupPath;
                int intIndex = strReportPath.IndexOf(APPLICATION_PATH);
                if (intIndex > -1)
                {
                    strReportPath = strReportPath.Substring(0, intIndex);
                }

                if (strReportPath.Substring(strReportPath.Length - 1) == @"\")
                {
                    strReportPath += Constants.REPORT_DEFINITION_STORE_LOCATION;
                }
                else
                {
                    strReportPath += "\\" + Constants.REPORT_DEFINITION_STORE_LOCATION;
                }

                //Set datasource and lay-out path for reports
                reportBuilder.ReportName = MASTER_SUBREPORT_NAME;
                reportBuilder.SourceDataTable = dtbResult;
                reportBuilder.SubReportDataSources.Add(SUBREPORT_NAME, dtbResult);
                reportBuilder.ReportDefinitionFolder = strReportPath;

                reportBuilder.ReportLayoutFile = DELIVERY_TO_OUTSOURCING_SLIP_REPORT;

                //check if layout is valid
                if (reportBuilder.AnalyseLayoutFile())
                {
                    reportBuilder.UseLayoutFile = true;
                }
                else
                {
                    //Set cursor to default
                    this.Cursor = Cursors.Default;
                    PCSMessageBox.Show(ErrorCode.MESSAGE_REPORT_TEMPLATE_FILE_NOT_FOUND, MessageBoxIcon.Error);
                    return;
                }

                reportBuilder.MakeDataTableForRender();

                // and show it in preview dialog
                reportBuilder.ReportViewer = printPreview.ReportViewer;
                reportBuilder.RenderReport();

                //Header information get from system params				
                reportBuilder.DrawPredefinedField(REPORTFLD_COMPANY, SystemProperty.SytemParams.Get(SystemParam.COMPANY_FULL_NAME));
                reportBuilder.Report.Fields[SUBREPORT_NAME].Subreport.Fields[REPORTFLD_COMPANY].Text = SystemProperty.SytemParams.Get(SystemParam.COMPANY_FULL_NAME);

                reportBuilder.RefreshReport();

                //Print report
                try
                {
                    printPreview.FormTitle = reportBuilder.GetFieldByName(REPORTFLD_TITLE).Text;
                }
                catch
                { }

                printPreview.Show();
            }
            catch (PCSException ex)
            {
                // displays the error message.
                PCSMessageBox.Show(ex.mCode, MessageBoxIcon.Error);
                // log message.
                try
                {
                    Logger.LogMessage(ex.CauseException, METHOD_NAME, Level.ERROR);
                }
                catch
                {
                    PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxIcon.Error);
                }
            }
            catch (Exception ex)
            {
                // displays the error message.
                PCSMessageBox.Show(ErrorCode.OTHER_ERROR, MessageBoxButtons.OK, MessageBoxIcon.Error);
                // log message.
                try
                {
                    Logger.LogMessage(ex, METHOD_NAME, Level.ERROR);
                }
                catch
                {
                    PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxButtons.OK, MessageBoxIcon.Error);
                }
            }
            finally
            {
                //Set cursor to default status
                this.Cursor = Cursors.Default;
            }
        }

        /// <summary>
        /// Build and show Destroy Slip Report
        /// </summary>
        /// <Author> Tuan TQ, 14 Mar, 2006</Author>
        private void ShowDestroySlipReport(object sender, System.EventArgs e)
        {
            const string METHOD_NAME = THIS + ".ShowDestroySlipReportReport()";
            try
            {
                const string REPORT_NAME = "DestroySlipReport";
                const string REPORT_LAYOUT_FILE = "DestroySlipReport.xml";
                const string REPORTFLD_TITLE = "fldTitle";

                const int ROWS_PER_PAGE = 30;
                const string MAX_ROWS = " 100 PERCENT ";

                const string APPLICATION_PATH = @"PCSMain\bin\Debug";

                const string REPORTFLD_COMPANY = "fldCompany";
                const string ROW_INDEX_FLD = "RowIndex";

                //un-used data column name
                const string ITEM_CODE_FLD = "ITM_ProductCode";
                const string ITEM_MODEL_FLD = "ITM_ProductRevision";
                const string ITEM_NAME_FLD = "ITM_ProductDescription";
                const string QUANTITY_FLD = "Quantity";
                const string STOCKUM_FLD = "StockUM";
                const string CATEGORY_FLD = "ITM_CategoryCode";
                const string VENDOR_FLD = "MST_PartyCode";


                //return if no record was selected
                if (txtTransNo.Tag == null)
                {
                    return;
                }

                int intMasterID;
                intMasterID = int.Parse(txtTransNo.Tag.ToString());
                if (intMasterID <= 0)
                {
                    return;
                }

                //Change cursor to wait status
                this.Cursor = Cursors.WaitCursor;

                C1PrintPreviewDialog printPreview = new C1PrintPreviewDialog();
                C1PrintPreviewDialogBO boDataReport = new C1PrintPreviewDialogBO();

                DataTable dtbResult;
                dtbResult = boDataReport.GetDestroySlipData(intMasterID, MAX_ROWS);

                // Check data source
                if (dtbResult != null)
                {
                    for (int i = 0; i < dtbResult.Rows.Count; i++)
                    {
                        dtbResult.Rows[i][ROW_INDEX_FLD] = i + 1;
                    }

                    //Prepare data for blank row
                    DataRow drowSourceBlankRow = dtbResult.NewRow();
                    if (dtbResult.Rows.Count > 0)
                    {
                        //Copy data
                        for (int colIndex = 0; colIndex < dtbResult.Columns.Count; colIndex++)
                        {
                            drowSourceBlankRow[colIndex] = dtbResult.Rows[0][colIndex];
                        }

                        //Clear value of un-used column
                        drowSourceBlankRow[ROW_INDEX_FLD] = DBNull.Value;
                        drowSourceBlankRow[ITEM_CODE_FLD] = DBNull.Value;
                        drowSourceBlankRow[ITEM_MODEL_FLD] = DBNull.Value;
                        drowSourceBlankRow[ITEM_NAME_FLD] = DBNull.Value;
                        drowSourceBlankRow[QUANTITY_FLD] = DBNull.Value;
                        drowSourceBlankRow[CATEGORY_FLD] = DBNull.Value;
                        drowSourceBlankRow[VENDOR_FLD] = DBNull.Value;
                        drowSourceBlankRow[STOCKUM_FLD] = DBNull.Value;
                    }

                    //Append blank rows to enough MAX_ROWS
                    int intTotalLackRows = ROWS_PER_PAGE - dtbResult.Rows.Count % ROWS_PER_PAGE;
                    for (int i = 1; i <= intTotalLackRows; i++)
                    {
                        //Create new blank row
                        DataRow drowBlank = dtbResult.NewRow();

                        //Copy data
                        for (int colIndex = 0; colIndex < dtbResult.Columns.Count; colIndex++)
                        {
                            drowBlank[colIndex] = drowSourceBlankRow[colIndex];
                        }

                        dtbResult.Rows.Add(drowBlank);
                    }
                }

                ReportWithSubReportBuilder reportBuilder = new ReportWithSubReportBuilder();

                //Get actual application path
                string strReportPath = Application.StartupPath;
                int intIndex = strReportPath.IndexOf(APPLICATION_PATH);
                if (intIndex > -1)
                {
                    strReportPath = strReportPath.Substring(0, intIndex);
                }

                if (strReportPath.Substring(strReportPath.Length - 1) == @"\")
                {
                    strReportPath += Constants.REPORT_DEFINITION_STORE_LOCATION;
                }
                else
                {
                    strReportPath += "\\" + Constants.REPORT_DEFINITION_STORE_LOCATION;
                }

                //Set datasource and lay-out path for reports
                reportBuilder.ReportName = REPORT_NAME;
                reportBuilder.SourceDataTable = dtbResult;
                reportBuilder.ReportDefinitionFolder = strReportPath;

                reportBuilder.ReportLayoutFile = REPORT_LAYOUT_FILE;

                //check if layout is valid
                if (reportBuilder.AnalyseLayoutFile())
                {
                    reportBuilder.UseLayoutFile = true;
                }
                else
                {
                    //Set cursor to default
                    this.Cursor = Cursors.Default;
                    PCSMessageBox.Show(ErrorCode.MESSAGE_REPORT_TEMPLATE_FILE_NOT_FOUND, MessageBoxIcon.Error);
                    return;
                }

                reportBuilder.MakeDataTableForRender();

                // and show it in preview dialog
                reportBuilder.ReportViewer = printPreview.ReportViewer;
                reportBuilder.RenderReport();

                //Header information get from system params				
                reportBuilder.DrawPredefinedField(REPORTFLD_COMPANY, SystemProperty.SytemParams.Get(SystemParam.COMPANY_FULL_NAME));

                reportBuilder.RefreshReport();

                //Print report
                try
                {
                    printPreview.FormTitle = reportBuilder.GetFieldByName(REPORTFLD_TITLE).Text;
                }
                catch
                { }

                printPreview.Show();
            }
            catch (PCSException ex)
            {
                // displays the error message.
                PCSMessageBox.Show(ex.mCode, MessageBoxIcon.Error);
                // log message.
                try
                {
                    Logger.LogMessage(ex.CauseException, METHOD_NAME, Level.ERROR);
                }
                catch
                {
                    PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxIcon.Error);
                }
            }
            catch (Exception ex)
            {
                // displays the error message.
                PCSMessageBox.Show(ErrorCode.OTHER_ERROR, MessageBoxButtons.OK, MessageBoxIcon.Error);
                // log message.
                try
                {
                    Logger.LogMessage(ex, METHOD_NAME, Level.ERROR);
                }
                catch
                {
                    PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxButtons.OK, MessageBoxIcon.Error);
                }
            }
            finally
            {
                //Set cursor to default status
                this.Cursor = Cursors.Default;
            }
        }

        /// <summary>
        /// Build and show Issue Material Slip Report with Issue Material purpose
        /// </summary>
        /// <Author> dungla</Author>
        private void ShowIssueForRequiredMaterial(object sender, System.EventArgs e)
        {
            const string REPORT_LAYOUT_FILE = "IssueMaterialSlip.xml";
            const string SINGLE_ISSUE_MASTERIAL_REPORT = "SingleIssueMaterialSlip";
            const string APPLICATION_PATH = @"PCSMain\bin\Debug";
            const string REPORTFLD_TITLE = "fldTitle";

            //return if no record was selected
            if (txtTransNo.Tag == null)
                return;

            int intMasterID;

            intMasterID = int.Parse(txtTransNo.Tag.ToString());
            if (intMasterID <= 0)
                return;

            C1PrintPreviewDialog printPreview = new C1PrintPreviewDialog();

            DataTable dtbResult;
            dtbResult = boMiscellaneousIssue.GetReportData(Convert.ToInt32(txtTransNo.Tag), Convert.ToInt32(txtPurpose.Tag));

            ReportWithSubReportBuilder reportBuilder = new ReportWithSubReportBuilder();

            #region Get Actual Report Path
            //Get actual application path
            string strReportPath = Application.StartupPath;
            int intIndex = strReportPath.IndexOf(APPLICATION_PATH);
            if (intIndex > -1)
            {
                strReportPath = strReportPath.Substring(0, intIndex);
            }

            if (strReportPath.Substring(strReportPath.Length - 1) == @"\")
            {
                strReportPath += Constants.REPORT_DEFINITION_STORE_LOCATION;
            }
            else
            {
                strReportPath += "\\" + Constants.REPORT_DEFINITION_STORE_LOCATION;
            }
            #endregion

            #region Get Data Source & Assign To Report
            // Check data source
            if (dtbResult != null)
            {
                //Set datasource and lay-out path for reports
                reportBuilder.ReportName = SINGLE_ISSUE_MASTERIAL_REPORT;
                reportBuilder.SourceDataTable = dtbResult;
            }

            #endregion

            reportBuilder.ReportLayoutFile = REPORT_LAYOUT_FILE;
            reportBuilder.ReportDefinitionFolder = strReportPath;

            //check if layout is valid
            if (reportBuilder.AnalyseLayoutFile())
            {
                reportBuilder.UseLayoutFile = true;
            }
            else
            {
                //Set cursor to default
                this.Cursor = Cursors.Default;
                PCSMessageBox.Show(ErrorCode.MESSAGE_REPORT_TEMPLATE_FILE_NOT_FOUND, MessageBoxIcon.Error);
                return;
            }

            reportBuilder.MakeDataTableForRender();

            // and show it in preview dialog
            reportBuilder.ReportViewer = printPreview.ReportViewer;
            reportBuilder.RenderReport();

            reportBuilder.RefreshReport();

            //Print report
            try
            {
                printPreview.FormTitle = reportBuilder.GetFieldByName(REPORTFLD_TITLE).Text;
            }
            catch
            { }
            printPreview.Show();
        }


        #endregion

        #region private methods
        /// <summary>
        /// Get master and detail to bind in the grid
        /// </summary>
        /// <param name="pintMasterID"></param>
        private void BindDataToGrid(int pintMasterID)
        {
            //get Master
            DataRow drowInfor = boMiscellaneousIssue.GetMiscellaneousMasterInfor(pintMasterID);
            if (drowInfor != null)
            {
                dtmPostDate.Value = drowInfor[IV_MiscellaneousIssueMasterTable.POSTDATE_FLD];
                txtTransNo.Text = drowInfor[IV_MiscellaneousIssueMasterTable.TRANSNO_FLD].ToString();
                txtComment.Text = drowInfor[IV_MiscellaneousIssueMasterTable.COMMENT_FLD].ToString();

                txtSourceBin.Text = drowInfor[IV_MiscellaneousIssueMasterTable.SOURCEBINID_FLD].ToString();
                txtDestBin.Text = drowInfor[IV_MiscellaneousIssueMasterTable.DESBINID_FLD].ToString();
                txtSourceLoc.Text = drowInfor[IV_MiscellaneousIssueMasterTable.SOURCELOCATIONID_FLD].ToString();
                txtDestLoc.Text = drowInfor[IV_MiscellaneousIssueMasterTable.DESLOCATIONID_FLD].ToString();
                txtSourceMasLoc.Text = drowInfor[IV_MiscellaneousIssueMasterTable.SOURCEMASLOCATIONID_FLD].ToString();
                txtDestMasLoc.Text = drowInfor[IV_MiscellaneousIssueMasterTable.DESMASLOCATIONID_FLD].ToString();
                txtPurpose.Text = drowInfor[PRO_IssuePurposeTable.TABLE_NAME + PRO_IssuePurposeTable.DESCRIPTION_FLD].ToString();
                txtParty.Text = drowInfor[MST_PartyTable.TABLE_NAME + MST_PartyTable.CODE_FLD].ToString();
                txtPartyName.Text = drowInfor[MST_PartyTable.TABLE_NAME + MST_PartyTable.NAME_FLD].ToString();
                txtPurpose.Tag = drowInfor[IV_MiscellaneousIssueMasterTable.ISSUEPURPOSEID_FLD];
                txtTransNo.Tag = drowInfor[IV_MiscellaneousIssueMasterTable.MISCELLANEOUSISSUEMASTERID_FLD].ToString().Trim();
                // Fill FGoodsCode
                try
                {
                    txtFGoodsCode.Tag = (int)drowInfor[IV_MiscellaneousIssueMasterTable.SALEORDERDETAILID_FLD];
                    SO_SaleOrderDetail voSaleDetail = new SaleOrderBO().GetSaleOrderDetail(Convert.ToInt32(txtFGoodsCode.Tag));
                    txtFGoodsCode.Text = voSaleDetail.FGoodsCode;
                }
                catch
                {
                    txtFGoodsCode.Tag = null;
                    txtFGoodsCode.Text = string.Empty;
                }
                try
                {
                    txtRequireMaterialNo.Tag = (int)drowInfor[IV_MiscellaneousIssueMasterTable.REQUIREDMATERIALMASTERID_FLD];
                    txtRequireMaterialNo.Text = boMiscellaneousIssue.GetRequiredMaster(Convert.ToInt32(txtRequireMaterialNo.Tag));
                }
                catch
                {
                    txtRequireMaterialNo.Text = string.Empty;
                    txtRequireMaterialNo.Tag = null;
                }
                try
                {
                    txtInvoice.Text = drowInfor[PO_InvoiceMasterTable.INVOICENO_FLD].ToString();
                    txtInvoice.Tag = Convert.ToInt32(drowInfor[PO_InvoiceMasterTable.INVOICEMASTERID_FLD]);
                }
                catch
                {
                    txtInvoice.Text = string.Empty;
                    txtInvoice.Tag = null;
                }
            }

            dstData = boMiscellaneousIssue.GetMiscellaneousByMaster(pintMasterID);
            for (int i = 0; i < dstData.Tables[0].Rows.Count; i++)
                dstData.Tables[0].Rows[i][PRO_WorkOrderDetailTable.LINE_FLD] = i + 1;
            dgrdData.DataSource = dstData.Tables[0];
            FormControlComponents.RestoreGridLayout(dgrdData, dtbGridLayout);
            FormMode = EnumAction.Default;
            SwitchFormMode();
        }

        /// <summary>
        /// Clear all cotrols on the form
        /// </summary>
        private void ResetForm()
        {
            dtmPostDate.Value = null;
            txtTransNo.Text = string.Empty;
            txtTransNo.Tag = null;
            txtComment.Text = string.Empty;
            txtSourceBin.Text = string.Empty;
            txtSourceBin.Tag = null;
            txtSourceLoc.Text = string.Empty;
            txtSourceLoc.Tag = null;
            txtSourceMasLoc.Text = string.Empty;
            txtSourceMasLoc.Tag = null;
            txtDestBin.Text = string.Empty;
            txtDestBin.Tag = null;
            txtDestLoc.Text = string.Empty;
            txtDestLoc.Tag = null;
            txtDestMasLoc.Text = string.Empty;
            txtDestMasLoc.Tag = null;
            txtParty.Text = string.Empty;
            txtParty.Tag = null;
            txtPurpose.Text = string.Empty;
            txtPurpose.Tag = null;
            txtPartyName.Text = string.Empty;
            txtFGoodsCode.Text = string.Empty;
            txtInvoice.Text = string.Empty;
            txtInvoice.Tag = null;
            txtRequireMaterialNo.Text = string.Empty;
            lblRequireMaterialNo.Tag = 0;
            dtmPostDate.Focus();
        }

        private void FillDataToVOObject()
        {
            voMiscellaneousMaster.CCNID = int.Parse(cboCCN.SelectedValue.ToString());
            DateTime dtmTransDate = (DateTime)dtmPostDate.Value;
            voMiscellaneousMaster.PostDate = new DateTime(dtmTransDate.Year, dtmTransDate.Month, dtmTransDate.Day, dtmTransDate.Hour, dtmTransDate.Minute, 0);

            voMiscellaneousMaster.Comment = txtComment.Text.Trim();
            voMiscellaneousMaster.UserName = SystemProperty.UserName;
            voMiscellaneousMaster.TransNo = txtTransNo.Text.Trim();
            voMiscellaneousMaster.SourceMasLocationID = int.Parse(txtSourceMasLoc.Tag.ToString());
            voMiscellaneousMaster.SourceLocationID = int.Parse(txtSourceLoc.Tag.ToString());
            if (txtSourceBin.Text.Trim() != string.Empty && txtSourceBin.Enabled)
                voMiscellaneousMaster.SourceBinID = int.Parse(txtSourceBin.Tag.ToString());
            if (txtDestMasLoc.Text.Trim() != string.Empty)
                voMiscellaneousMaster.DesMasLocationID = int.Parse(txtDestMasLoc.Tag.ToString());
            else
                voMiscellaneousMaster.DesMasLocationID = 0;
            if (txtDestLoc.Text.Trim() != string.Empty)
                voMiscellaneousMaster.DesLocationID = int.Parse(txtDestLoc.Tag.ToString());
            else
                voMiscellaneousMaster.DesLocationID = 0;

            if (txtDestBin.Text.Trim() != string.Empty)
                voMiscellaneousMaster.DesBinID = int.Parse(txtDestBin.Tag.ToString());
            else
                voMiscellaneousMaster.DesBinID = 0;
            if (txtPurpose.Text.Trim() != string.Empty)
                voMiscellaneousMaster.IssuePurposeID = (int)txtPurpose.Tag;
            else
                voMiscellaneousMaster.IssuePurposeID = 0;
            if (txtParty.Text.Trim() != string.Empty)
                voMiscellaneousMaster.PartyID = (int)txtParty.Tag;
            else
                voMiscellaneousMaster.PartyID = 0;
            if (txtInvoice.Text.Trim().Length > 0)
                voMiscellaneousMaster.InvoiceMasterID = (int)txtInvoice.Tag;
            else
                voMiscellaneousMaster.InvoiceMasterID = 0;

            try
            {
                voMiscellaneousMaster.SaleOrderDetailID = (int)txtFGoodsCode.Tag;
            }
            catch
            {
                voMiscellaneousMaster.SaleOrderDetailID = 0;
            }
            try
            {
                voMiscellaneousMaster.RequiredMaterialMasterID = (int)txtRequireMaterialNo.Tag;
            }
            catch
            {
                voMiscellaneousMaster.RequiredMaterialMasterID = 0;
            }

            voMiscellaneousMaster.Comment = txtComment.Text.Trim();
        }

        /// <summary>
        /// Chang the state of control when FormMode is changed
        /// </summary>
        private void SwitchFormMode()
        {
            switch (FormMode)
            {
                case EnumAction.Add:
                    btnAdd.Enabled = false;
                    btnDelete.Enabled = false;
                    txtTransNo.Enabled = false;
                    btnSave.Enabled = true;
                    btnTransNo.Enabled = false;
                    dtmPostDate.Enabled = true;

                    txtComment.Enabled = true;
                    txtSourceMasLoc.Enabled = true;
                    txtSourceLoc.Enabled = true;
                    txtSourceBin.Enabled = false;
                    txtDestMasLoc.Enabled = true;
                    txtDestLoc.Enabled = true;
                    txtDestBin.Enabled = false;
                    dgrdData.AllowDelete = true;
                    btnSourceBin.Enabled = false;
                    btnDestBin.Enabled = false;

                    txtParty.Enabled = true;
                    txtPurpose.Enabled = true;
                    btnParty.Enabled = true;
                    txtPartyName.Enabled = true;
                    btnPartyName.Enabled = true;
                    btnPurpose.Enabled = true;
                    btnPrint.Enabled = false;

                    btnSourceMasLoc.Enabled = true;
                    btnDestMasLoc.Enabled = true;
                    btnSourceLoc.Enabled = true;
                    btnDestLoc.Enabled = true;
                    btnSourceBin.Enabled = false;
                    btnDestBin.Enabled = false;
                    txtFGoodsCode.Enabled = true;
                    btnFGoodsCode.Enabled = true;
                    txtRequireMaterialNo.Enabled = true;
                    btnRequireMaterialNo.Enabled = true;
                    ConfigGrid(false);
                    break;
                case EnumAction.Edit:
                    break;
                default:
                    btnAdd.Enabled = true;
                    if (txtTransNo.Text != string.Empty)
                        btnDelete.Enabled = true;
                    else
                        btnDelete.Enabled = false;
                    btnSave.Enabled = false;
                    btnTransNo.Enabled = true;
                    txtTransNo.Enabled = true;
                    dtmPostDate.Enabled = false;

                    txtComment.Enabled = false;
                    txtSourceMasLoc.Enabled = false;
                    txtSourceLoc.Enabled = false;
                    txtSourceBin.Enabled = false;
                    txtDestMasLoc.Enabled = false;
                    txtDestLoc.Enabled = false;
                    txtDestBin.Enabled = false;
                    dgrdData.AllowDelete = false;
                    txtParty.Enabled = false;
                    txtPurpose.Enabled = false;
                    btnParty.Enabled = false;
                    btnPurpose.Enabled = false;
                    btnPrint.Enabled = true;

                    btnSourceMasLoc.Enabled = false;
                    btnDestMasLoc.Enabled = false;
                    btnSourceLoc.Enabled = false;
                    btnDestLoc.Enabled = false;
                    btnSourceBin.Enabled = false;
                    btnDestBin.Enabled = false;
                    txtPartyName.Enabled = false;
                    btnPartyName.Enabled = false;
                    txtFGoodsCode.Enabled = false;
                    btnFGoodsCode.Enabled = false;
                    txtRequireMaterialNo.Enabled = false;
                    btnRequireMaterialNo.Enabled = false;
                    txtInvoice.Enabled = false;
                    btnInvoice.Enabled = false;
                    ConfigGrid(true);
                    break;
            }
        }

        /// <summary>
        /// Create template datasource for add event
        /// </summary>
        private void CreateDataSet()
        {
            dstData = new DataSet();
            dstData.Tables.Add(IV_MiscellaneousIssueDetailTable.TABLE_NAME);

            dstData.Tables[0].Columns.Add(new DataColumn(PRO_WorkOrderDetailTable.LINE_FLD, typeof(int)));
            dstData.Tables[0].Columns.Add(IV_MiscellaneousIssueDetailTable.MISCELLANEOUSISSUEMASTERID_FLD);
            dstData.Tables[0].Columns.Add(IV_MiscellaneousIssueDetailTable.MISCELLANEOUSISSUEDETAILID_FLD);
            dstData.Tables[0].Columns.Add(IV_MiscellaneousIssueDetailTable.PRODUCTID_FLD);
            dstData.Tables[0].Columns.Add(ITM_ProductTable.STOCKUMID_FLD);
            dstData.Tables[0].Columns.Add(LOT_CONTROL_FLD);

            dstData.Tables[0].Columns.Add(PART_NUMBER_FLD);
            dstData.Tables[0].Columns.Add(PART_NAME_FLD);
            dstData.Tables[0].Columns.Add(MODEL_FLD);
            dstData.Tables[0].Columns.Add(UNIT_FLD);
            dstData.Tables[0].Columns.Add(IV_MiscellaneousIssueDetailTable.AVAILABLEQTY_FLD, typeof(decimal));
            dstData.Tables[0].Columns.Add(IV_MiscellaneousIssueDetailTable.QUANTITY_FLD, typeof(decimal));
            dstData.Tables[0].Columns.Add(IV_MiscellaneousIssueDetailTable.LOT_FLD);
            dstData.Tables[0].Columns.Add(ITM_ProductTable.RATE_FLD);
            dstData.Tables[0].Columns.Add(new DataColumn(PRO_RequiredMaterialDetailTable.QUANTITY_FLD, typeof(decimal)));
        }

        /// <summary>
        /// Lock and config grid
        /// </summary>
        /// <param name="pblnLock"></param>
        private void ConfigGrid(bool pblnLock)
        {
            dgrdData.Enabled = true;
            for (int i = 0; i < dgrdData.Splits[0].DisplayColumns.Count; i++)
            {
                dgrdData.Splits[0].DisplayColumns[i].Locked = true;
            }
            if (!pblnLock)
            {
                dgrdData.Splits[0].DisplayColumns[PART_NUMBER_FLD].Locked = pblnLock;
                dgrdData.Splits[0].DisplayColumns[PART_NAME_FLD].Locked = pblnLock;
                dgrdData.Splits[0].DisplayColumns[IV_MiscellaneousIssueDetailTable.LOT_FLD].Locked = pblnLock;
                dgrdData.Splits[0].DisplayColumns[IV_MiscellaneousIssueDetailTable.QUANTITY_FLD].Locked = pblnLock;
                dgrdData.Splits[0].DisplayColumns[PART_NUMBER_FLD].Button = true;
                dgrdData.Splits[0].DisplayColumns[PART_NAME_FLD].Button = true;
                dgrdData.Splits[0].DisplayColumns[IV_MiscellaneousIssueDetailTable.LOT_FLD].Button = true;
            }
            dgrdData.Splits[0].DisplayColumns[IV_MiscellaneousIssueDetailTable.QUANTITY_FLD].Style.HorizontalAlignment = AlignHorzEnum.Far;
            dgrdData.Splits[0].DisplayColumns[IV_MiscellaneousIssueDetailTable.AVAILABLEQTY_FLD].DataColumn.NumberFormat = Constants.DECIMAL_LONG_FORMAT;
            dgrdData.Splits[0].DisplayColumns[IV_MiscellaneousIssueDetailTable.QUANTITY_FLD].DataColumn.NumberFormat = Constants.DECIMAL_LONG_FORMAT;
        }

        /// <summary>
        /// validate data before save
        /// </summary>
        /// <returns></returns>
        private bool ValidateData()
        {
            if (FormControlComponents.CheckMandatory(dtmPostDate))
            {
                PCSMessageBox.Show(ErrorCode.MANDATORY_INVALID);
                dtmPostDate.Focus();
                dtmPostDate.Select();
                return false;
            }
            if (!FormControlComponents.CheckDateInCurrentPeriod(DateTime.Parse(dtmPostDate.Value.ToString())))
            {
                PCSMessageBox.Show(ErrorCode.MESSAGE_RGV_POSTDATE_PERIOD);
                dtmPostDate.Focus();
                dtmPostDate.Select();
                return false;
            }
            //check the PostDate smaller than the current date
            if ((DateTime)dtmPostDate.Value >
                new UtilsBO().GetDBDate())
            {
                //MessageBox.Show("The Post Date you input is not in the current period");
                PCSMessageBox.Show(ErrorCode.MESSAGE_INV_TRANSACTION_CANNOT_IN_FUTURE, MessageBoxIcon.Warning);
                dtmPostDate.Focus();
                return false;
            }
            if (FormControlComponents.CheckMandatory(txtTransNo))
            {
                PCSMessageBox.Show(ErrorCode.MANDATORY_INVALID);
                txtTransNo.Focus();
                txtTransNo.Select();
                return false;
            }
            if (FormControlComponents.CheckMandatory(txtPurpose))
            {
                PCSMessageBox.Show(ErrorCode.MANDATORY_INVALID);
                txtPurpose.Focus();
                return false;
            }
            if (FormControlComponents.CheckMandatory(txtSourceMasLoc))
            {
                PCSMessageBox.Show(ErrorCode.MANDATORY_INVALID);
                txtSourceMasLoc.Focus();
                txtSourceMasLoc.Select();
                return false;
            }
            if (FormControlComponents.CheckMandatory(txtSourceLoc))
            {
                PCSMessageBox.Show(ErrorCode.MANDATORY_INVALID);
                txtSourceLoc.Focus();
                txtSourceLoc.Select();
                return false;
            }

            if (txtPurpose.Text.Trim() != string.Empty
                && lblPurpose.Tag.ToString() == 1.ToString())
            {
                if (txtDestMasLoc.Text.Trim() == string.Empty)
                {
                    PCSMessageBox.Show(ErrorCode.MANDATORY_INVALID);
                    txtDestMasLoc.Focus();
                    return false;
                }
            }

            if (txtDestMasLoc.Text.Trim() != string.Empty
                && txtDestLoc.Text.Trim() == string.Empty)
            {
                PCSMessageBox.Show(ErrorCode.MANDATORY_INVALID);
                txtDestLoc.Focus();
                txtDestLoc.Select();
                return false;
            }
            if ((txtSourceBin.Text.Trim() != string.Empty) && (txtDestBin.Text.Trim() != string.Empty) && (txtSourceBin.Text.Trim() == txtDestBin.Text.Trim()))
            {
                PCSMessageBox.Show(ErrorCode.MESSAGE_LOCTOLOC_DIFFERENCE_BIN, MessageBoxIcon.Error);
                txtDestBin.Focus();
                return false;
            }
            if ((txtSourceBin.Text.Trim() == string.Empty) && (txtDestBin.Text.Trim() == string.Empty) && (txtSourceLoc.Text.Trim() == txtDestLoc.Text.Trim()))
            {
                PCSMessageBox.Show(ErrorCode.MESSAGE_LOCTOLOC_DIFFERENCE_LOC, MessageBoxIcon.Error);
                txtDestLoc.Focus();
                return false;
            }
            if (txtSourceLoc.Text.Trim() != string.Empty)
            {
                if (txtSourceBin.Text.Trim() == string.Empty && lblSourceLoc.Tag.ToString() == true.ToString())
                {
                    PCSMessageBox.Show(ErrorCode.MESSAGE_LOCTOLOC_SELECT_SOURCE_BIN, MessageBoxIcon.Error);
                    txtSourceBin.Focus();
                    return false;
                }
            }
            if (lblFGoodsCode.ForeColor == Color.Maroon)
            {
                if (FormControlComponents.CheckMandatory(txtFGoodsCode))
                {
                    PCSMessageBox.Show(ErrorCode.MANDATORY_INVALID);
                    txtFGoodsCode.Focus();
                    txtFGoodsCode.Select();
                    return false;
                }
                if (FormControlComponents.CheckMandatory(txtRequireMaterialNo))
                {
                    PCSMessageBox.Show(ErrorCode.MANDATORY_INVALID);
                    txtRequireMaterialNo.Focus();
                    txtRequireMaterialNo.Select();
                    return false;
                }
            }
            if (txtDestLoc.Text.Trim() != string.Empty)
            {
                if (txtDestBin.Text.Trim() == string.Empty && lblDestLoc.Tag.ToString() == true.ToString(CultureInfo.InvariantCulture))
                {
                    PCSMessageBox.Show(ErrorCode.MESSAGE_LOCTOLOC_SELECT_DEST_BIN, MessageBoxIcon.Error);
                    txtDestBin.Focus();
                    return false;
                }
            }
            if (lblParty.ForeColor == Color.Maroon)
            {
                if (FormControlComponents.CheckMandatory(txtParty))
                {
                    PCSMessageBox.Show(ErrorCode.MANDATORY_INVALID);
                    txtParty.Focus();
                    txtParty.Select();
                    return false;
                }
                if (FormControlComponents.CheckMandatory(txtPartyName))
                {
                    PCSMessageBox.Show(ErrorCode.MANDATORY_INVALID);
                    txtPartyName.Focus();
                    txtPartyName.Select();
                    return false;
                }
            }
            //check row in grid
            if (dgrdData.RowCount == 0)
            {
                PCSMessageBox.Show(ErrorCode.MESSAGE_LOCTOLOC_HAS_ATLEAST_ONELINE);
                dgrdData.Row = 0;
                dgrdData.Col = dgrdData.Splits[0].DisplayColumns.IndexOf(dgrdData.Splits[0].DisplayColumns[PART_NUMBER_FLD]);
                dgrdData.Focus();
                return false;
            }

            //check madatory field in grid
            int intRountCount = dgrdData.RowCount;
            ArrayList arrProductID = new ArrayList();
            for (int i = 0; i < intRountCount; i++)
            {
                if (dgrdData[i, PART_NUMBER_FLD].ToString() == string.Empty)
                {
                    PCSMessageBox.Show(ErrorCode.MANDATORY_INVALID, MessageBoxIcon.Error);
                    dgrdData.Row = i;
                    dgrdData.Col = dgrdData.Splits[0].DisplayColumns.IndexOf(dgrdData.Splits[0].DisplayColumns[PART_NUMBER_FLD]);
                    dgrdData.Focus();
                    return false;
                }
                if (dgrdData[i, IV_MiscellaneousIssueDetailTable.STOCKUMID_FLD] == null ||
                    dgrdData[i, IV_MiscellaneousIssueDetailTable.STOCKUMID_FLD].ToString() == string.Empty)
                {
                    PCSMessageBox.Show(ErrorCode.MANDATORY_INVALID, MessageBoxIcon.Error);
                    dgrdData.Row = i;
                    dgrdData.Col = dgrdData.Splits[0].DisplayColumns.IndexOf(dgrdData.Splits[0].DisplayColumns[UNIT_FLD]);
                    dgrdData.Focus();
                    return false;
                }
                if (dgrdData[i, IV_MiscellaneousIssueDetailTable.QUANTITY_FLD].ToString() == string.Empty)
                {
                    PCSMessageBox.Show(ErrorCode.MESSAGE_LOCTOLOC_TRANSFER_QUANTITY, MessageBoxIcon.Error);
                    dgrdData.Row = i;
                    dgrdData.Col = dgrdData.Splits[0].DisplayColumns.IndexOf(dgrdData.Splits[0].DisplayColumns[IV_MiscellaneousIssueDetailTable.QUANTITY_FLD]);
                    dgrdData.Focus();
                    return false;
                }
                if (arrProductID.Contains(dgrdData[i, IV_MiscellaneousIssueDetailTable.PRODUCTID_FLD].ToString()))
                {
                    PCSMessageBox.Show(ErrorCode.MESSAGE_LOCTOLOC_DUPLICATE_ITEM, MessageBoxIcon.Error);
                    dgrdData.Row = i;
                    dgrdData.Col = dgrdData.Splits[0].DisplayColumns.IndexOf(dgrdData.Splits[0].DisplayColumns[PART_NUMBER_FLD]);
                    dgrdData.Focus();
                    return false;
                }
                arrProductID.Add(dgrdData[i, IV_MiscellaneousIssueDetailTable.PRODUCTID_FLD].ToString());

                decimal decQuantity = decimal.Parse(dgrdData[i, IV_MiscellaneousIssueDetailTable.QUANTITY_FLD].ToString());
                if (decQuantity <= 0)
                {
                    string[] strMsg = new string[] { dgrdData.Columns[IV_MiscellaneousIssueDetailTable.QUANTITY_FLD].Caption, "0" };
                    PCSMessageBox.Show(ErrorCode.MESSAGE_GREATER_THAN, MessageBoxIcon.Warning, strMsg);
                    dgrdData.Row = i;
                    dgrdData.Col = dgrdData.Columns.IndexOf(dgrdData.Columns[IV_MiscellaneousIssueDetailTable.QUANTITY_FLD]);
                    return false;
                }
                decimal decAvailableQuantity = decimal.Parse(dgrdData[i, IV_MiscellaneousIssueDetailTable.AVAILABLEQTY_FLD].ToString());
                if (decQuantity > decAvailableQuantity)
                {
                    PCSMessageBox.Show(ErrorCode.MESSAGE_MATERIALISSUE_AVAILABLE_EQUAL_ZERO, MessageBoxIcon.Error);
                    dgrdData.Row = i;
                    dgrdData.Col = dgrdData.Columns.IndexOf(dgrdData.Columns[PART_NUMBER_FLD]);
                    return false;
                }
                if (txtPurpose.Tag.Equals((int)PurposeEnum.IssueMaterial))
                {
                    decimal decRequireQuantity = decimal.Parse(dgrdData[i, PRO_RequiredMaterialDetailTable.QUANTITY_FLD].ToString());
                    if (decQuantity > decRequireQuantity)
                    {
                        string[] strMsg = new string[] { "0", dgrdData[i, PRO_RequiredMaterialDetailTable.QUANTITY_FLD].ToString() };
                        PCSMessageBox.Show(ErrorCode.MESSAGE_NUMBER_MUST_IN_SCOPE, MessageBoxIcon.Error, strMsg);
                        dgrdData.Row = i;
                        dgrdData.Col = dgrdData.Columns.IndexOf(dgrdData.Columns[PART_NUMBER_FLD]);
                        return false;
                    }
                }
            }

            //Check postdate in configuration
            if (!FormControlComponents.CheckPostDateInConfiguration((DateTime)dtmPostDate.Value))
            {
                return false;
            }

            // must have at least one destination
            if (string.IsNullOrEmpty(txtDestMasLoc.Text.Trim()) &&
                string.IsNullOrEmpty(txtDestLoc.Text.Trim()) &&
                string.IsNullOrEmpty(txtDestBin.Text.Trim()) &&
                string.IsNullOrEmpty(txtParty.Text.Trim()))
            {
                PCSMessageBox.Show(ErrorCode.MANDATORY_INVALID);
                txtDestMasLoc.Focus();
                txtDestMasLoc.Select();
                return false;
            }
            return true;
        }

        /// <summary>
        /// Fill data for item after selected
        /// </summary>
        /// <param name="pdrowData"></param>
        private void FillItemDataToGrid(DataRow pdrowData)
        {
            dgrdData.EditActive = true;
            dgrdData[dgrdData.Row, PRO_WorkOrderDetailTable.LINE_FLD] = dgrdData.Row + 1;
            dgrdData[dgrdData.Row, ITM_ProductTable.PRODUCTID_FLD] = int.Parse(pdrowData[ITM_ProductTable.PRODUCTID_FLD].ToString());
            dgrdData[dgrdData.Row, PART_NUMBER_FLD] = pdrowData[ITM_ProductTable.CODE_FLD];
            dgrdData[dgrdData.Row, PART_NAME_FLD] = pdrowData[ITM_ProductTable.DESCRIPTION_FLD];
            dgrdData[dgrdData.Row, MODEL_FLD] = pdrowData[ITM_ProductTable.REVISION_FLD];
            dgrdData[dgrdData.Row, UNIT_FLD] = pdrowData[MST_UnitOfMeasureTable.TABLE_NAME + MST_UnitOfMeasureTable.CODE_FLD];
            dgrdData[dgrdData.Row, IV_MiscellaneousIssueDetailTable.STOCKUMID_FLD] = pdrowData[IV_MiscellaneousIssueDetailTable.STOCKUMID_FLD];
            dgrdData[dgrdData.Row, ITM_ProductTable.LOTCONTROL_FLD] = pdrowData[ITM_ProductTable.LOTCONTROL_FLD];
            // clear issue quantity
            dgrdData[dgrdData.Row, IV_MiscellaneousIssueDetailTable.QUANTITY_FLD] = string.Empty;

            Hashtable htbCriteria = new Hashtable();
            DataTable dtbRows;
            htbCriteria.Add(ITM_ProductTable.PRODUCTID_FLD, dgrdData[dgrdData.Row, ITM_ProductTable.PRODUCTID_FLD].ToString());
            if (txtSourceBin.Text != string.Empty)
            {
                int intMasLocID = Convert.ToInt32(txtSourceMasLoc.Tag);
                int intLocID = Convert.ToInt32(txtSourceLoc.Tag);
                int intBinID = Convert.ToInt32(txtSourceBin.Tag);

                int intProductID = int.Parse(pdrowData[ITM_ProductTable.PRODUCTID_FLD].ToString());

                decimal decMyTest = boIVUtils.GetAvailableQtyByPostDate(dtmCurrentDate, int.Parse(cboCCN.SelectedValue.ToString()), intMasLocID, intLocID, intBinID, intProductID);

                dgrdData[dgrdData.Row, IV_MiscellaneousIssueDetailTable.AVAILABLEQTY_FLD] = decMyTest;

                //get lot of item in Bin
                htbCriteria.Add(IV_BinCacheTable.CCNID_FLD, cboCCN.SelectedValue.ToString());
                dtbRows = new UtilsBO().GetRows(IV_BinCacheTable.TABLE_NAME, IV_BinCacheTable.LOT_FLD, string.Empty, htbCriteria);
                if (dtbRows.Rows.Count == 1)
                {
                    dgrdData[dgrdData.Row, IV_MiscellaneousIssueDetailTable.LOT_FLD] = dtbRows.Rows[0][IV_MiscellaneousIssueDetailTable.LOT_FLD].ToString();
                }
            }
            else
            {
                dgrdData[dgrdData.Row, IV_MiscellaneousIssueDetailTable.AVAILABLEQTY_FLD] = boIVUtils.GetAvailableQtyByPostDate(dtmCurrentDate, int.Parse(cboCCN.SelectedValue.ToString()), (int)txtSourceMasLoc.Tag, (int)txtSourceLoc.Tag, 0, int.Parse(pdrowData[ITM_ProductTable.PRODUCTID_FLD].ToString()));
            }
        }

        /// <summary>
        /// Get serial and fill data to control
        /// </summary>
        /// <param name="pdrowLot"></param>
        private void FillLotAndAutoFillSerial(DataRow pdrowLot)
        {
            if (pdrowLot[IV_BinCacheTable.COMMITQUANTITY_FLD].ToString() != string.Empty)
            {
                dgrdData[dgrdData.Row, IV_MiscellaneousIssueDetailTable.AVAILABLEQTY_FLD] = decimal.Parse(pdrowLot[IV_BinCacheTable.OHQUANTITY_FLD].ToString()) - decimal.Parse(pdrowLot[IV_BinCacheTable.COMMITQUANTITY_FLD].ToString());
            }
            else
                dgrdData[dgrdData.Row, IV_MiscellaneousIssueDetailTable.AVAILABLEQTY_FLD] = decimal.Parse(pdrowLot[IV_BinCacheTable.OHQUANTITY_FLD].ToString());
        }

        /// <summary>
        /// Disable destination when user changed/clear purpose 
        /// </summary>
        /// <param name="pintPurposeCode">Purpose Code. 0 empty purpose</param>
        private void DisableDestintion(int pintPurposeCode)
        {
            if (pintPurposeCode > 0)
            {
                bool blnHasDestination = Convert.ToBoolean(lblPurpose.Tag);
                switch (pintPurposeCode)
                {
                    case (int)PurposeEnum.CompensationForCustomer:
                    case (int)PurposeEnum.Misc:// allow enter party, destintion mas loc, loc, bin
                        lblParty.ForeColor = Color.Black;
                        txtParty.Enabled = true;
                        btnParty.Enabled = true;
                        txtPartyName.Enabled = true;
                        btnPartyName.Enabled = true;

                        txtDestMasLoc.Tag = null;
                        txtDestMasLoc.Enabled = true;
                        btnDestMasLoc.Enabled = true;
                        lblDestMasLoc.ForeColor = Color.Maroon;

                        txtDestLoc.Tag = null;
                        txtDestLoc.Enabled = true;
                        btnDestLoc.Enabled = true;
                        lblDestLoc.Tag = null;
                        lblDestLoc.ForeColor = Color.Maroon;

                        txtDestBin.Tag = null;
                        txtDestBin.Enabled = true;
                        btnDestBin.Enabled = true;
                        lblDestBin.ForeColor = Color.Maroon;

                        lblFGoodsCode.ForeColor = Color.Black;
                        lblRequireMaterialNo.ForeColor = Color.Black;
                        txtFGoodsCode.Enabled = true;
                        txtRequireMaterialNo.Enabled = true;
                        btnFGoodsCode.Enabled = true;
                        btnRequireMaterialNo.Enabled = true;
                        txtInvoice.Enabled = true;
                        btnInvoice.Enabled = true;
                        break;
                    case (int)PurposeEnum.LocToLoc:
                    case (int)PurposeEnum.ReturnPrevious:
                    case (int)PurposeEnum.Scrap:
                        txtParty.Tag = null;
                        txtParty.Enabled = false;
                        btnParty.Enabled = false;
                        txtPartyName.Tag = null;
                        txtPartyName.Enabled = false;
                        btnPartyName.Enabled = false;

                        txtDestMasLoc.Enabled = true;
                        btnDestMasLoc.Enabled = true;

                        txtDestLoc.Enabled = true;
                        btnDestLoc.Enabled = true;

                        lblFGoodsCode.ForeColor = Color.Black;
                        lblRequireMaterialNo.ForeColor = Color.Black;
                        txtFGoodsCode.Enabled = false;
                        txtRequireMaterialNo.Enabled = false;
                        btnFGoodsCode.Enabled = false;
                        btnRequireMaterialNo.Enabled = false;
                        txtInvoice.Enabled = false;
                        btnInvoice.Enabled = false;

                        lblDestMasLoc.ForeColor = (blnHasDestination) ? Color.Maroon : Color.Black;
                        lblDestLoc.ForeColor = (blnHasDestination) ? Color.Maroon : Color.Black;
                        lblParty.ForeColor = Color.Black;

                        lblFGoodsCode.ForeColor = Color.Black;
                        lblRequireMaterialNo.ForeColor = Color.Black;
                        txtFGoodsCode.Enabled = true;
                        txtRequireMaterialNo.Enabled = true;
                        btnFGoodsCode.Enabled = true;
                        btnRequireMaterialNo.Enabled = true;
                        txtInvoice.Enabled = true;
                        btnInvoice.Enabled = true;
                        break;
                    case (int)PurposeEnum.IssueMaterial:
                        // disable destination
                        txtParty.Tag = null;
                        txtParty.Enabled = false;
                        btnParty.Enabled = false;
                        txtPartyName.Tag = null;
                        txtPartyName.Enabled = false;
                        btnPartyName.Enabled = false;

                        txtDestMasLoc.Tag = null;
                        txtDestMasLoc.Enabled = false;
                        btnDestMasLoc.Enabled = false;
                        lblDestMasLoc.ForeColor = Color.Black;

                        txtDestLoc.Tag = null;
                        txtDestLoc.Enabled = false;
                        btnDestLoc.Enabled = false;
                        lblDestLoc.Tag = null;
                        lblDestLoc.ForeColor = Color.Black;

                        txtDestBin.Tag = null;
                        txtDestBin.Enabled = false;
                        btnDestBin.Enabled = false;

                        lblFGoodsCode.ForeColor = Color.Maroon;
                        lblRequireMaterialNo.ForeColor = Color.Maroon;
                        txtFGoodsCode.Enabled = true;
                        txtRequireMaterialNo.Enabled = true;
                        btnFGoodsCode.Enabled = true;
                        btnRequireMaterialNo.Enabled = true;
                        txtInvoice.Enabled = false;
                        btnInvoice.Enabled = false;
                        break;
                    default: // disable party, enable destination
                        txtParty.Tag = null;
                        txtParty.Enabled = false;
                        btnParty.Enabled = false;
                        txtPartyName.Tag = null;
                        txtPartyName.Enabled = false;
                        btnPartyName.Enabled = false;

                        txtDestMasLoc.Enabled = true;
                        btnDestMasLoc.Enabled = true;

                        txtDestLoc.Enabled = true;
                        btnDestLoc.Enabled = true;

                        lblFGoodsCode.ForeColor = Color.Black;
                        lblRequireMaterialNo.ForeColor = Color.Black;
                        txtFGoodsCode.Enabled = false;
                        txtRequireMaterialNo.Enabled = false;
                        btnFGoodsCode.Enabled = false;
                        btnRequireMaterialNo.Enabled = false;
                        txtInvoice.Enabled = false;
                        btnInvoice.Enabled = false;

                        lblDestMasLoc.ForeColor = (blnHasDestination) ? Color.Maroon : Color.Black;
                        lblDestLoc.ForeColor = (blnHasDestination) ? Color.Maroon : Color.Black;
                        lblParty.ForeColor = Color.Black;
                        break;
                }
            }
            else
            {
                txtParty.Enabled = false;
                btnParty.Enabled = false;
                txtPartyName.Enabled = false;
                btnPartyName.Enabled = false;

                txtDestMasLoc.Enabled = false;
                btnDestMasLoc.Enabled = false;

                txtDestLoc.Enabled = false;
                btnDestLoc.Enabled = false;

                txtDestBin.Enabled = false;
                btnDestBin.Enabled = false;

                lblDestMasLoc.ForeColor = Color.Black;
                lblDestLoc.ForeColor = Color.Black;

                lblFGoodsCode.ForeColor = Color.Black;
                lblRequireMaterialNo.ForeColor = Color.Black;
                txtFGoodsCode.Enabled = false;
                txtRequireMaterialNo.Enabled = false;
                btnFGoodsCode.Enabled = false;
                btnRequireMaterialNo.Enabled = false;
                txtInvoice.Enabled = false;
                btnInvoice.Enabled = false;
            }
        }

        /// <summary>
        /// When purpose was changed, clear Source and Destination Bin, clear grid
        /// </summary>
        private void ChangePurpose()
        {
            strLastValidFGoodsCode = txtFGoodsCode.Text = string.Empty;
            txtFGoodsCode.Tag = null;

            strLastValidRequireNo = txtRequireMaterialNo.Text = string.Empty;
            txtRequireMaterialNo.Tag = null;

            strLastValidSourceBin = txtSourceBin.Text = string.Empty;
            txtSourceBin.Tag = null;

            strLastValidDestMasLoc = txtDestMasLoc.Text = string.Empty;
            txtDestMasLoc.Tag = null;

            strLastValidDestLoc = txtDestLoc.Text = string.Empty;
            txtDestLoc.Tag = null;

            strLastValidDestBin = txtDestBin.Text = string.Empty;
            txtDestBin.Tag = null;

            strLastValidPartyCode = txtParty.Text = string.Empty;
            txtParty.Tag = null;
            strLastValidPartyName = txtPartyName.Text = string.Empty;

            // clear grid information if have any data
            if (dstData != null && dstData.Tables.Count > 0)
                dstData.Tables[0].Clear();
        }
        /// <summary>
        /// update grid detail for new bin
        /// </summary>
        /// <param name="pintBinID">New Bin ID. 0 will be empty bin</param>
        private void UpdateGridWhenChangeSouceBin(int pintBinID)
        {
            // update grid detail for new bin, fix bug 3669 from thuypt
            if (dstData != null && dstData.Tables.Count > 0)
            {
                if (pintBinID > 0)
                {
                    for (int i = dstData.Tables[0].Rows.Count - 1; i >= 0; i--)
                    {
                        DataRow drowData = dstData.Tables[0].Rows[i];
                        if (drowData[ITM_ProductTable.PRODUCTID_FLD] != null &&
                            drowData[ITM_ProductTable.PRODUCTID_FLD] != DBNull.Value)
                        {
                            // if current item is not exist in new bin, remove from grid
                            bool blnIsExist = boIVUtils.IsHasProductInBin(pintBinID, Convert.ToInt32(drowData[ITM_ProductTable.PRODUCTID_FLD]));
                            //get Availbale by PostDate
                            if (blnIsExist)
                            {
                                decimal decAvailableQty = boIVUtils.GetAvailableQtyByPostDate(dtmCurrentDate, int.Parse(cboCCN.SelectedValue.ToString()), (int)txtSourceMasLoc.Tag, (int)txtSourceLoc.Tag, pintBinID, Convert.ToInt32(drowData[ITM_ProductTable.PRODUCTID_FLD]));
                                if (txtRequireMaterialNo.Text.Trim().Length != 0 && Convert.ToInt32(txtPurpose.Tag) != (int)PurposeEnum.IssueMaterial)
                                    decAvailableQty = decAvailableQty / Decimal.Parse(drowData[ITM_ProductTable.RATE_FLD].ToString());
                                drowData[IV_MiscellaneousIssueDetailTable.AVAILABLEQTY_FLD] = decAvailableQty;
                            }
                            else
                                drowData[IV_MiscellaneousIssueDetailTable.AVAILABLEQTY_FLD] = decimal.Zero;
                        }
                    }
                }
            }
        }
        /// <summary>
        /// Update available quantity in grid if has any changes
        /// </summary>
        private void UpdateAvailableQuantityInGrid()
        {
            for (int i = 0; i < dgrdData.RowCount - 1; i++)
            {
                if (dgrdData[i, PART_NUMBER_FLD].ToString() != string.Empty)
                {
                    //get Availbale by PostDate
                    if (txtSourceBin.Text.Trim() != string.Empty)
                        //						dgrdData[i, IV_MiscellaneousIssueDetailTable.AVAILABLEQTY_FLD] = boIVUtils.GetAvailableQtyByPostDate((DateTime)dtmPostDate.Value, int.Parse(cboCCN.SelectedValue.ToString()), (int) txtSourceMasLoc.Tag, (int) txtSourceLoc.Tag, (int) txtSourceBin.Tag, int.Parse(dgrdData[i, ITM_ProductTable.PRODUCTID_FLD].ToString()));
                        dgrdData[i, IV_MiscellaneousIssueDetailTable.AVAILABLEQTY_FLD] = boIVUtils.GetAvailableQtyByPostDate(dtmCurrentDate, int.Parse(cboCCN.SelectedValue.ToString()), (int)txtSourceMasLoc.Tag, (int)txtSourceLoc.Tag, (int)txtSourceBin.Tag, int.Parse(dgrdData[i, ITM_ProductTable.PRODUCTID_FLD].ToString()));
                    else
                        dgrdData[i, IV_MiscellaneousIssueDetailTable.AVAILABLEQTY_FLD] = boIVUtils.GetAvailableQtyByPostDate(dtmCurrentDate, int.Parse(cboCCN.SelectedValue.ToString()), (int)txtSourceMasLoc.Tag, (int)txtSourceLoc.Tag, 0, int.Parse(dgrdData[i, ITM_ProductTable.PRODUCTID_FLD].ToString()));
                }
            }
        }
        private void ClearFormIfSourceMasLocChange()
        {
            txtSourceLoc.Tag = null;
            strLastValidSourceLoc = txtSourceLoc.Text = string.Empty;
            txtSourceBin.Tag = null;
            strLastValidSourceBin = txtSourceBin.Text = string.Empty;
            CreateDataSet();
            dgrdData.DataSource = dstData.Tables[0];
            FormControlComponents.RestoreGridLayout(dgrdData, dtbGridLayout);
            ConfigGrid(false);
        }

        private void ClearFormIfSourceLocChange()
        {
            txtSourceBin.Tag = null;
            strLastValidSourceBin = txtSourceBin.Text = string.Empty;
            //			CreateDataSet();
            //			dgrdData.DataSource = dstData.Tables[0];
            //			FormControlComponents.RestoreGridLayout(dgrdData, dtbGridLayout);
            //			ConfigGrid(false);
        }

        private void ClearFormIfDestLocChange()
        {
            txtDestBin.Tag = null;
            strLastValidDestBin = txtDestBin.Text = string.Empty;
        }

        private void ClearFormIfDestMasLocChange()
        {
            txtDestLoc.Tag = null;
            strLastValidDestLoc = txtDestLoc.Text = string.Empty;
            txtDestBin.Tag = null;
            strLastValidDestBin = txtDestBin.Text = string.Empty;
            strLastValidPartyCode = txtParty.Text = string.Empty;
            strLastValidPartyName = txtPartyName.Text = string.Empty;
            txtParty.Tag = null;
        }

        /// <summary>
        /// Display search form for select purpose
        /// </summary>
        /// <param name="pblnOpenForm">Open form or not</param>
        /// <returns>DataRowView</returns>
        private DataRowView SearchPurpose(bool pblnOpenForm)
        {
            Hashtable htbCondition = new Hashtable();
            htbCondition.Add(PRO_IssuePurposeTable.TRANTYPEID_FLD, intTransTypeID);
            DataRowView drowView = FormControlComponents.OpenSearchForm(PRO_IssuePurposeTable.TABLE_NAME, PRO_IssuePurposeTable.DESCRIPTION_FLD, txtPurpose.Text.Trim(), htbCondition, pblnOpenForm);
            return drowView;
        }
        /// <summary>
        /// Display search form for select source bin
        /// </summary>
        /// <param name="pblnOpenForm">Open form or not</param>
        /// <returns>DataRowView</returns>
        private DataRowView SearchSourceBin(bool pblnOpenForm)
        {
            DataRowView drwResult = null;
            Hashtable htbCondition = new Hashtable();
            string strWhere = string.Empty;
            int intPurposeCode = Convert.ToInt32(txtPurpose.Tag);
            htbCondition.Add(MST_BINTable.LOCATIONID_FLD, txtSourceLoc.Tag.ToString());

            strWhere += MST_BINTable.TABLE_NAME + "." + MST_BINTable.LOCATIONID_FLD + "=" + txtSourceLoc.Tag.ToString();

            // 25-04-2006 dungla: thuypt required:
            switch (intPurposeCode)
            {
                case (int)PurposeEnum.Transfer:
                    // Purpose= Loc Transfer from NG to OK, SourceBin must be NG.
                    htbCondition.Add(MST_BINTable.BINTYPEID_FLD, (int)BinTypeEnum.NG);
                    break;
                case (int)PurposeEnum.Outside:
                    // Purpose= Outside processing, SourceBin must be OK, BF.
                    strWhere += " AND (" + MST_BINTable.TABLE_NAME + "." + MST_BINTable.BINTYPEID_FLD + "=" + (int)BinTypeEnum.OK;
                    strWhere += " OR " + MST_BINTable.TABLE_NAME + "." + MST_BINTable.BINTYPEID_FLD + "=" + (int)BinTypeEnum.IN + ")";
                    break;
            }
            // 25-04-2006 dungla: thuypt required:
            if (intPurposeCode == (int)PurposeEnum.Outside)
                drwResult = FormControlComponents.OpenSearchFormWithWhere(MST_BINTable.TABLE_NAME, MST_BINTable.CODE_FLD, txtSourceBin.Text, strWhere, pblnOpenForm);
            else
                drwResult = FormControlComponents.OpenSearchForm(MST_BINTable.TABLE_NAME, MST_BINTable.CODE_FLD, txtSourceBin.Text, htbCondition, pblnOpenForm);
            return drwResult;
        }
        /// <summary>
        /// Display search form for select destination bin
        /// </summary>
        /// <param name="pblnOpenForm">Open form or not</param>
        /// <returns>DataRowView</returns>
        private DataRowView SearchDestBin(bool pblnOpenForm)
        {
            DataRowView drwResult = null;
            Hashtable htbCondition = new Hashtable();
            string strWhere = string.Empty;
            int intPurposeCode = Convert.ToInt32(txtPurpose.Tag);
            htbCondition.Add(MST_BINTable.LOCATIONID_FLD, txtDestLoc.Tag.ToString());
            strWhere += v_BinNoSecurity.TABLE_NAME + "." + MST_BINTable.LOCATIONID_FLD + "=" + txtDestLoc.Tag.ToString();
            switch (intPurposeCode)
            {
                case (int)PurposeEnum.Scrap:
                    // Purpose= Xuat Huy then To Bin has Type=Destroy.
                    htbCondition.Add(MST_BINTable.BINTYPEID_FLD, (int)BinTypeEnum.LS);
                    break;
                case (int)PurposeEnum.Transfer:
                    // Purpose= NG to OK then To Bin has Type=OK.
                    htbCondition.Add(MST_BINTable.BINTYPEID_FLD, (int)BinTypeEnum.OK);
                    break;
                case (int)PurposeEnum.Outside:
                    // Purpose= Outside then To Bin has Type=BF.
                    htbCondition.Add(MST_BINTable.BINTYPEID_FLD, (int)BinTypeEnum.IN);
                    break;
                default:
                    // other purpose: To Bin cannot be Destroy
                    strWhere += " AND " + v_BinNoSecurity.TABLE_NAME + "." + MST_BINTable.BINTYPEID_FLD + "<>" + (int)BinTypeEnum.LS;
                    break;
            }
            if (intPurposeCode == (int)PurposeEnum.Scrap ||
                intPurposeCode == (int)PurposeEnum.Transfer ||
                intPurposeCode == (int)PurposeEnum.Outside)
                drwResult = FormControlComponents.OpenSearchForm(v_BinNoSecurity.TABLE_NAME, v_BinNoSecurity.CODE_FLD, txtDestBin.Text, htbCondition, pblnOpenForm);
            else
                drwResult = FormControlComponents.OpenSearchFormWithWhere(v_BinNoSecurity.TABLE_NAME, v_BinNoSecurity.CODE_FLD, txtDestBin.Text, strWhere, pblnOpenForm);
            return drwResult;
        }
        /// <summary>
        /// Open search form for select party
        /// </summary>
        /// <param name="pintPurposeCode">Purpose</param>
        /// <param name="pstrField">Filter Field</param>
        /// <param name="pstrValue">Filter Value</param>
        /// <param name="pblnOpenForm">Open form or not</param>
        /// <returns>DataRowView</returns>
        private DataRowView SearchParty(int pintPurposeCode, string pstrField, string pstrValue, bool pblnOpenForm)
        {
            DataRowView drowView = null;
            string strWhere = string.Empty;
            // CompensationForCustomer: Party type = Customer & Both
            if (pintPurposeCode == (int)PurposeEnum.CompensationForCustomer)
            {
                strWhere += MST_PartyTable.TABLE_NAME + "." + MST_PartyTable.TYPE_FLD + "=" + (int)PartyTypeEnum.CUSTOMER;
                strWhere += " OR " + MST_PartyTable.TABLE_NAME + "." + MST_PartyTable.TYPE_FLD + "=" + (int)PartyTypeEnum.BOTH;
                drowView = FormControlComponents.OpenSearchFormWithWhere(MST_PartyTable.TABLE_NAME, pstrField, pstrValue, strWhere, pblnOpenForm);
            }
            else // otherwise display all type
                drowView = FormControlComponents.OpenSearchForm(MST_PartyTable.TABLE_NAME, pstrField, pstrValue, null, pblnOpenForm);
            return drowView;
        }
        /// <summary>
        /// Fill Purpose data based on search result
        /// </summary>
        /// <param name="pdrwResult">Search result</param>
        private void FillPurposeData(DataRowView pdrwResult)
        {
            txtPurpose.Text = pdrwResult[PRO_IssuePurposeTable.DESCRIPTION_FLD].ToString();
            txtPurpose.Tag = pdrwResult[PRO_IssuePurposeTable.ISSUEPURPOSEID_FLD];

            lblPurpose.Tag = pdrwResult[PRO_IssuePurposeTable.HASDESTIONATION_FLD];
            // user has changed purpose
            if (strLastValidPurpose != txtPurpose.Text)
            {
                DisableDestintion(Convert.ToInt32(txtPurpose.Tag));
                ChangePurpose();
                // assign new valid purpose
                strLastValidPurpose = txtPurpose.Text;
            }
        }
        /// <summary>
        /// Fill master location data based on search result
        /// </summary>
        /// <param name="pdrvData">Search result</param>
        /// <param name="pblnIsSource">true: Source. false: Destination</param>
        private void FillMasterLocationData(DataRowView pdrvData, bool pblnIsSource)
        {
            if (pblnIsSource)
                FillSourceMasterLocationData(pdrvData);
            else
                FillDestMasterLocationData(pdrvData);
        }
        /// <summary>
        /// Fill location data based on search result
        /// </summary>
        /// <param name="pdrvData">Search result</param>
        /// <param name="pblnIsSource">true: Source. false: Destination</param>
        private void FillLocationData(DataRowView pdrvData, bool pblnIsSource)
        {
            if (pblnIsSource)
                FillSourceLocationData(pdrvData);
            else
                FillDestLocationData(pdrvData);
        }
        /// <summary>
        /// Fill bin data based on search result
        /// </summary>
        /// <param name="pdrvData">Search result</param>
        /// <param name="pblnIsSource">true: Source. false: Destination</param>
        private void FillBinData(DataRowView pdrvData, bool pblnIsSource)
        {
            if (pblnIsSource)
                FillSourceBinData(pdrvData);
            else
                FillDestBinData(pdrvData);
        }
        /// <summary>
        /// Fill Source Master Location data based on search result
        /// </summary>
        /// <param name="pdrwResult">Search result</param>
        private void FillSourceMasterLocationData(DataRowView pdrwResult)
        {
            txtSourceMasLoc.Text = pdrwResult[MST_MasterLocationTable.CODE_FLD].ToString();
            txtSourceMasLoc.Tag = int.Parse(pdrwResult[MST_MasterLocationTable.MASTERLOCATIONID_FLD].ToString());
            // user has changed source master location
            if (strLastValidSouceMasLoc != txtSourceMasLoc.Text)
            {
                // clear data
                ClearFormIfSourceMasLocChange();
                // assign new valid source master location
                strLastValidSouceMasLoc = txtSourceMasLoc.Text;
            }
        }
        /// <summary>
        /// Fill destination master location data based on search result
        /// </summary>
        /// <param name="pdrwResult">Search result</param>
        private void FillDestMasterLocationData(DataRowView pdrwResult)
        {
            txtDestMasLoc.Text = pdrwResult[MST_MasterLocationTable.CODE_FLD].ToString();
            txtDestMasLoc.Tag = int.Parse(pdrwResult[MST_MasterLocationTable.MASTERLOCATIONID_FLD].ToString());
            lblDestLoc.ForeColor = Color.Maroon;
            // user has changed destination master location
            if (strLastValidDestMasLoc != txtDestMasLoc.Text)
            {
                // clear data
                ClearFormIfDestMasLocChange();
                // assign new valid dest. master location
                strLastValidDestMasLoc = txtDestMasLoc.Text;
            }
        }
        /// <summary>
        /// Fill source location data based on search result
        /// </summary>
        /// <param name="pdrwResult">Search result</param>
        private void FillSourceLocationData(DataRowView pdrwResult)
        {
            txtSourceLoc.Text = pdrwResult[MST_LocationTable.CODE_FLD].ToString();
            txtSourceLoc.Tag = int.Parse(pdrwResult[MST_LocationTable.LOCATIONID_FLD].ToString());
            bool blnBinControl = Convert.ToBoolean(pdrwResult[MST_LocationTable.BIN_FLD]);
            lblSourceLoc.Tag = blnBinControl;
            txtSourceBin.Enabled = blnBinControl;
            btnSourceBin.Enabled = blnBinControl;
            // user has changed source location
            if (strLastValidSourceLoc != txtSourceLoc.Text)
            {
                // clear data
                ClearFormIfSourceLocChange();
                // assign new valid source location
                strLastValidSourceLoc = txtSourceLoc.Text;
            }
        }
        /// <summary>
        /// Fill destination location data based on search result
        /// </summary>
        /// <param name="pdrwResult">Search result</param>
        private void FillDestLocationData(DataRowView pdrwResult)
        {
            txtDestLoc.Text = pdrwResult[MST_LocationTable.CODE_FLD].ToString();
            txtDestLoc.Tag = int.Parse(pdrwResult[MST_LocationTable.LOCATIONID_FLD].ToString());
            bool blnBinControl = Convert.ToBoolean(pdrwResult[MST_LocationTable.BIN_FLD]);
            lblDestLoc.Tag = blnBinControl;
            txtDestBin.Enabled = blnBinControl;
            btnDestBin.Enabled = blnBinControl;
            // user has changed destination location
            if (strLastValidDestLoc != txtDestLoc.Text)
            {
                // clear data
                ClearFormIfDestLocChange();
                // assign new valid data
                strLastValidDestLoc = txtDestLoc.Text;
            }
        }
        /// <summary>
        /// Fill source bin data based on search result
        /// </summary>
        /// <param name="pdrwResult">Search result</param>	
        private void FillSourceBinData(DataRowView pdrwResult)
        {
            txtSourceBin.Text = pdrwResult[MST_BINTable.CODE_FLD].ToString();
            txtSourceBin.Tag = int.Parse(pdrwResult[MST_BINTable.BINID_FLD].ToString());
            if (strLastValidSourceBin != txtSourceBin.Text)
            {
                // update grid
                UpdateGridWhenChangeSouceBin(Convert.ToInt32(txtSourceBin.Tag));
                // assign new valid source bin
                strLastValidSourceBin = txtSourceBin.Text;
            }
            //FormControlComponents.SetDefaultMasterLocation(txtDestMasLoc);
        }
        /// <summary>
        /// Fill destination bin data based on search result
        /// </summary>
        /// <param name="pdrwResult">Search result</param>
        private void FillDestBinData(DataRowView pdrwResult)
        {
            strLastValidDestBin = txtDestBin.Text = pdrwResult[MST_BINTable.CODE_FLD].ToString();
            txtDestBin.Tag = int.Parse(pdrwResult[MST_BINTable.BINID_FLD].ToString());
        }
        /// <summary>
        /// Fill Party data based on search result
        /// </summary>
        /// <param name="pdrwResult">Search result</param>
        private void FillPartyData(DataRowView pdrwResult)
        {
            strLastValidPartyCode = txtParty.Text = pdrwResult[MST_PartyTable.CODE_FLD].ToString();
            strLastValidPartyName = txtPartyName.Text = pdrwResult[MST_PartyTable.NAME_FLD].ToString();
            txtParty.Tag = pdrwResult[MST_PartyTable.PARTYID_FLD];
            // clear master location, location, bin if any
            txtDestMasLoc.Tag = null;
            strLastValidDestMasLoc = txtDestMasLoc.Text = string.Empty;
            txtDestLoc.Tag = null;
            strLastValidDestLoc = txtDestLoc.Text = string.Empty;
            txtDestBin.Tag = null;
            strLastValidDestBin = txtDestBin.Text = string.Empty;
        }
        /// <summary>
        /// Fill Sale data based on search result
        /// </summary>
        /// <param name="pdrwResult">Search result</param>
        private void FillSaleData(DataRowView pdrwResult)
        {
            if (pdrwResult != null)
            {
                txtFGoodsCode.Text = pdrwResult[SO_SaleOrderDetailTable.FGOODSCODE_FLD].ToString();
                txtFGoodsCode.Tag = int.Parse(pdrwResult[SO_SaleOrderDetailTable.SALEORDERDETAILID_FLD].ToString());
            }
            else
            {
                txtFGoodsCode.Text = string.Empty;
                txtFGoodsCode.Tag = null;
            }
            // user has changed f.goods code
            if (strLastValidFGoodsCode != txtFGoodsCode.Text)
            {
                // clear data
                txtRequireMaterialNo.Text = string.Empty;
                txtRequireMaterialNo.Tag = null;
                strLastValidDestMasLoc = txtDestMasLoc.Text = string.Empty;
                strLastValidDestLoc = txtDestLoc.Text = string.Empty;
                strLastValidDestBin = txtDestBin.Text = string.Empty;
                txtDestMasLoc.Tag = null;
                txtDestLoc.Tag = null;
                txtDestBin.Tag = null;
                // clear grid
                CreateDataSet();
                dgrdData.DataSource = dstData.Tables[0];
                FormControlComponents.RestoreGridLayout(dgrdData, dtbGridLayout);
                ConfigGrid(false);
                // assign new valid f.goods code
                strLastValidFGoodsCode = txtFGoodsCode.Text;
            }
        }
        /// <summary>
        /// Fill Required Material data based on search result
        /// </summary>
        /// <param name="pdrwResult">Search result</param>
        private void FillRequiredMaterialData(DataRowView pdrwResult)
        {
            if (pdrwResult != null)
            {
                // Fill data to control
                txtRequireMaterialNo.Text = pdrwResult[PRO_RequiredMaterialMasterTable.TRANSNO_FLD].ToString();
                txtRequireMaterialNo.Tag = int.Parse(pdrwResult[PRO_RequiredMaterialMasterTable.REQUIREMATERIALMASTERID_FLD].ToString());
                btnRequireMaterialNo.Tag = int.Parse(pdrwResult[PRO_RequiredMaterialMasterTable.PRODUCTIONLINEID_FLD].ToString());
                //Get PorductionLine Infomation with location and bin
                var dtProductionFull = new ProductionLineBO().GetInfoWithLocationAndBin(pdrwResult[PRO_RequiredMaterialMasterTable.PRODUCTIONLINEID_FLD].ToString(), ((int)BinTypeEnum.IN).ToString());
                // Fill data to Location and bin
                FormControlComponents.SetDefaultMasterLocation(txtDestMasLoc);

                txtDestLoc.Tag = int.Parse(dtProductionFull.Rows[0][PRO_ProductionLineTable.LOCATIONID_FLD].ToString());
                txtDestLoc.Text = dtProductionFull.Rows[0][MST_LocationTable.TABLE_NAME + MST_LocationTable.CODE_FLD].ToString();

                txtDestBin.Tag = int.Parse(dtProductionFull.Rows[0][MST_BINTable.BINID_FLD].ToString());
                txtDestBin.Text = dtProductionFull.Rows[0][MST_BINTable.TABLE_NAME + MST_BINTable.CODE_FLD].ToString();

                // Fill data to detail control
                var dstTemp = boMiscellaneousIssue.GetDataFromRequiredMaterial((int)txtRequireMaterialNo.Tag, (int)txtSourceBin.Tag);
                // Set Row
                int introw = 1;
                // clear old data first
                if (dstData.Tables.Count > 0)
                    dstData.Tables[0].Clear();
                // add new data
                foreach (DataRow drow in dstTemp.Tables[0].Rows)
                {
                    DataRow drowNew = dstData.Tables[0].NewRow();
                    drow[PRO_WorkOrderDetailTable.LINE_FLD] = introw;
                    introw++;
                    drowNew.ItemArray = drow.ItemArray;
                    dstData.Tables[0].Rows.Add(drowNew);
                }

                dgrdData.DataSource = dstData.Tables[0];
                FormControlComponents.RestoreGridLayout(dgrdData, dtbGridLayout);
                ConfigGrid(false);
            }
            else
            {
                txtRequireMaterialNo.Text = string.Empty;
                txtRequireMaterialNo.Tag = null;
                // clear grid
                CreateDataSet();
                dgrdData.DataSource = dstData.Tables[0];
                FormControlComponents.RestoreGridLayout(dgrdData, dtbGridLayout);
                ConfigGrid(false);
            }
            // user has changed required material transaction
            if (strLastValidRequireNo != null && strLastValidRequireNo != txtRequireMaterialNo.Text)
            {
                strLastValidRequireNo = txtRequireMaterialNo.Text;
            }
        }

        #endregion

        private void IVLocToLocTransfer_Load(object sender, System.EventArgs e)
        {
            const string METHOD_NAME = THIS + ".IVLocToLocTransfer_Load()";
            try
            {
                Security objSecurity = new Security();
                this.Name = THIS;
                if (objSecurity.SetRightForUserOnForm(this, SystemProperty.UserName) == 0)
                {
                    this.Close();
                    return;
                }

                //Load CCN and set default CCN
                UtilsBO boUtils = new UtilsBO();
                DataSet dstCCN = boUtils.ListCCN();
                cboCCN.DataSource = dstCCN.Tables[MST_CCNTable.TABLE_NAME];
                cboCCN.DisplayMember = MST_CCNTable.CODE_FLD;
                cboCCN.ValueMember = MST_CCNTable.CCNID_FLD;
                FormControlComponents.PutDataIntoC1ComboBox(cboCCN, dstCCN.Tables[MST_CCNTable.TABLE_NAME], MST_CCNTable.CODE_FLD, MST_CCNTable.CCNID_FLD, MST_CCNTable.TABLE_NAME);
                if (SystemProperty.CCNID != 0)
                {
                    cboCCN.SelectedValue = SystemProperty.CCNID;
                }
                //HACK: added by Tuan TQ. Format post date
                dtmPostDate.FormatType = C1.Win.C1Input.FormatTypeEnum.CustomFormat;
                dtmPostDate.CustomFormat = DATE_TIME_HOUR_FORMAT;
                dtmCurrentDate = boUtils.GetDBDate().AddDays(1);
                //Reset form and save grid's layout
                dtbGridLayout = FormControlComponents.StoreGridLayout(dgrdData);
                SwitchFormMode();

                intTransTypeID = new UtilsBO().GetTransTypeIDByCode(TransactionTypeEnum.IVMiscellaneousIssue.ToString());
            }
            catch (PCSException ex)
            {
                PCSMessageBox.Show(ex.mCode, MessageBoxIcon.Error);
                try
                {
                    Logger.LogMessage(ex.CauseException, METHOD_NAME, Level.ERROR);
                }
                catch
                {
                    PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxIcon.Error);
                }
            }
            catch (Exception ex)
            {
                PCSMessageBox.Show(ErrorCode.OTHER_ERROR, MessageBoxIcon.Error);
                try
                {
                    Logger.LogMessage(ex, METHOD_NAME, Level.ERROR);
                }
                catch
                {
                    PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxIcon.Error);
                }
            }
        }

        private void IVLocToLocTransfer_Closing(object sender, System.ComponentModel.CancelEventArgs e)
        {
            const string METHOD_NAME = THIS + ".IVLocToLocTransfer_Closing()";
            try
            {
                if (FormMode == EnumAction.Add)
                {
                    DialogResult confirmDialog = PCSMessageBox.Show(ErrorCode.MESSAGE_QUESTION_STORE_INTO_DATABASE, MessageBoxButtons.YesNoCancel, MessageBoxIcon.Question);
                    switch (confirmDialog)
                    {
                        case DialogResult.Yes:
                            //Save before exit
                            btnSave_Click(btnSave, new EventArgs());
                            if (blnHasError)
                            {
                                e.Cancel = true;
                            }
                            break;
                        case DialogResult.No:
                            break;
                        case DialogResult.Cancel:
                            e.Cancel = true;
                            break;
                    }
                }
            }
            catch (Exception ex)
            {
                PCSMessageBox.Show(ErrorCode.OTHER_ERROR, MessageBoxIcon.Error);
                try
                {
                    Logger.LogMessage(ex, METHOD_NAME, Level.ERROR);
                }
                catch
                {
                    PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxIcon.Error);
                }
            }
        }


        #region Button's clicking event

        private void btnTransNo_Click(object sender, System.EventArgs e)
        {
            const string METHOD_NAME = THIS + ".btnTransNo_Click()";
            try
            {
                Hashtable htbCriterial = new Hashtable();
                DataRowView drwResult = null;
                if (cboCCN.SelectedValue != null)
                {
                    htbCriterial.Add(IV_MiscellaneousIssueMasterTable.CCNID_FLD, cboCCN.SelectedValue.ToString());
                }
                else
                {
                    PCSMessageBox.Show(ErrorCode.MESSAGE_RGA_CCN, MessageBoxIcon.Warning);
                    cboCCN.Focus();
                    return;
                }
                drwResult = FormControlComponents.OpenSearchForm(IV_MiscellaneousIssueMasterTable.TABLE_NAME, IV_MiscellaneousIssueMasterTable.TRANSNO_FLD, txtTransNo.Text.Trim(), htbCriterial, true);
                if (drwResult != null)
                    BindDataToGrid(Convert.ToInt32(drwResult[IV_MiscellaneousIssueMasterTable.MISCELLANEOUSISSUEMASTERID_FLD]));
                else
                    txtTransNo.Focus();
            }
            catch (PCSException ex)
            {
                PCSMessageBox.Show(ex.mCode, MessageBoxIcon.Error);
                try
                {
                    Logger.LogMessage(ex.CauseException, METHOD_NAME, Level.ERROR);
                }
                catch
                {
                    PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxIcon.Error);
                }
            }
            catch (Exception ex)
            {
                PCSMessageBox.Show(ErrorCode.OTHER_ERROR, MessageBoxIcon.Error);
                try
                {
                    Logger.LogMessage(ex, METHOD_NAME, Level.ERROR);
                }
                catch
                {
                    PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxIcon.Error);
                }
            }
        }

        private void btnPurpose_Click(object sender, System.EventArgs e)
        {
            const string METHOD_NAME = THIS + ".btnPurpose_Click()";
            try
            {
                DataRowView drowView = SearchPurpose(true);
                if (drowView != null)
                    FillPurposeData(drowView);
                else
                    txtPurpose.Focus();
            }
            catch (PCSException ex)
            {
                // Displays the error message if throwed from PCSException.
                PCSMessageBox.Show(ex.mCode, MessageBoxIcon.Error);
                try
                {
                    // Log error message into log file.
                    Logger.LogMessage(ex.CauseException, METHOD_NAME, Level.ERROR);
                }
                catch
                {
                    // Show message if logger has an error.
                    PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxIcon.Error);
                }
            }
            catch (Exception ex)
            {
                // Displays the error message if throwed from system.
                PCSMessageBox.Show(ErrorCode.OTHER_ERROR, MessageBoxIcon.Error);
                try
                {
                    // Log error message into log file.
                    Logger.LogMessage(ex, METHOD_NAME, Level.ERROR);
                }
                catch
                {
                    // Show message if logger has an error.
                    PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxIcon.Error);
                }
            }
        }

        private void btnSourceMasLoc_Click(object sender, System.EventArgs e)
        {
            const string METHOD_NAME = THIS + ".btnSourceMasLoc_Click()";
            try
            {
                if (cboCCN.SelectedValue == null)
                {
                    PCSMessageBox.Show(ErrorCode.MESSAGE_RGA_CCN, MessageBoxIcon.Warning);
                    if (txtSourceMasLoc.Text != string.Empty)
                        txtSourceMasLoc.Focus();
                    else
                        cboCCN.Focus();
                    return;
                }
                DataRowView drwResult = null;
                Hashtable htbCondition = new Hashtable();
                htbCondition.Add(MST_MasterLocationTable.CCNID_FLD, cboCCN.SelectedValue.ToString());
                drwResult = FormControlComponents.OpenSearchForm(MST_MasterLocationTable.TABLE_NAME, MST_MasterLocationTable.CODE_FLD, txtSourceMasLoc.Text, htbCondition, true);
                if (drwResult != null)
                    FillMasterLocationData(drwResult, true);
                else
                    txtSourceMasLoc.Focus();
            }
            catch (PCSException ex)
            {
                PCSMessageBox.Show(ex.mCode, MessageBoxIcon.Error);
                try
                {
                    Logger.LogMessage(ex.CauseException, METHOD_NAME, Level.ERROR);
                }
                catch
                {
                    PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxIcon.Error);
                }
            }
            catch (Exception ex)
            {
                PCSMessageBox.Show(ErrorCode.OTHER_ERROR, MessageBoxIcon.Error);
                try
                {
                    Logger.LogMessage(ex, METHOD_NAME, Level.ERROR);
                }
                catch
                {
                    PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxIcon.Error);
                }
            }
        }

        private void btnSourceLoc_Click(object sender, System.EventArgs e)
        {
            const string METHOD_NAME = THIS + ".btnSourceLoc_Click()";
            try
            {
                if (txtSourceMasLoc.Tag == null)
                {
                    string[] msgs = { lblSourceMasLoc.Text, lblSourceLoc.Text };
                    PCSMessageBox.Show(ErrorCode.MESSAGE_SELECT_ONE_BEFORE_SELECT_ONE, MessageBoxIcon.Warning, msgs);
                    if (txtSourceLoc.Text != string.Empty)
                        txtSourceLoc.Focus();
                    else
                        txtSourceMasLoc.Focus();
                    return;
                }
                DataRowView drwResult = null;
                Hashtable htbCondition = new Hashtable();
                htbCondition.Add(MST_LocationTable.MASTERLOCATIONID_FLD, txtSourceMasLoc.Tag.ToString());
                drwResult = FormControlComponents.OpenSearchForm(MST_LocationTable.TABLE_NAME, MST_LocationTable.CODE_FLD, txtSourceLoc.Text, htbCondition, true);
                if (drwResult != null)
                    FillLocationData(drwResult, true);
                else
                    txtSourceLoc.Focus();
            }
            catch (PCSException ex)
            {
                PCSMessageBox.Show(ex.mCode, MessageBoxIcon.Error);
                try
                {
                    Logger.LogMessage(ex.CauseException, METHOD_NAME, Level.ERROR);
                }
                catch
                {
                    PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxIcon.Error);
                }
            }
            catch (Exception ex)
            {
                PCSMessageBox.Show(ErrorCode.OTHER_ERROR, MessageBoxIcon.Error);
                try
                {
                    Logger.LogMessage(ex, METHOD_NAME, Level.ERROR);
                }
                catch
                {
                    PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxIcon.Error);
                }
            }
        }

        private void btnSourceBin_Click(object sender, System.EventArgs e)
        {
            const string METHOD_NAME = THIS + ".btnSourceBin_Click()";
            try
            {
                // check purpose for mandatory field
                if (txtPurpose.Tag == null)
                {
                    string[] msgs = { lblPurpose.Text, lblSourceBin.Text };
                    PCSMessageBox.Show(ErrorCode.MESSAGE_SELECT_ONE_BEFORE_SELECT_ONE, MessageBoxIcon.Warning, msgs);
                    if (txtDestBin.Text != string.Empty)
                        txtDestBin.Focus();
                    else
                        txtPurpose.Focus();
                    return;
                }

                if (txtSourceLoc.Tag == null)
                {
                    string[] msgs = { lblSourceLoc.Text, lblSourceBin.Text };
                    PCSMessageBox.Show(ErrorCode.MESSAGE_SELECT_ONE_BEFORE_SELECT_ONE, MessageBoxIcon.Warning, msgs);
                    if (txtSourceBin.Text != string.Empty)
                        txtSourceBin.Focus();
                    else
                        txtSourceLoc.Focus();
                    return;
                }
                DataRowView drwResult = SearchSourceBin(true);
                if (drwResult != null)
                    FillBinData(drwResult, true);
                else
                    txtSourceBin.Focus();
            }
            catch (PCSException ex)
            {
                PCSMessageBox.Show(ex.mCode, MessageBoxIcon.Error);
                try
                {
                    Logger.LogMessage(ex.CauseException, METHOD_NAME, Level.ERROR);
                }
                catch
                {
                    PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxIcon.Error);
                }
            }
            catch (Exception ex)
            {
                PCSMessageBox.Show(ErrorCode.OTHER_ERROR, MessageBoxIcon.Error);
                try
                {
                    Logger.LogMessage(ex, METHOD_NAME, Level.ERROR);
                }
                catch
                {
                    PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxIcon.Error);
                }
            }
        }

        private void btnDestMasLoc_Click(object sender, System.EventArgs e)
        {
            const string METHOD_NAME = THIS + ".btnDestMasLoc_Click()";
            try
            {
                if (cboCCN.SelectedValue == null)
                {
                    PCSMessageBox.Show(ErrorCode.MESSAGE_RGA_CCN, MessageBoxIcon.Warning);
                    if (txtDestMasLoc.Text != string.Empty)
                        txtDestMasLoc.Focus();
                    else
                        cboCCN.Focus();
                    return;
                }
                DataRowView drwResult = null;
                Hashtable htbCondition = new Hashtable();
                htbCondition.Add(MST_MasterLocationTable.CCNID_FLD, cboCCN.SelectedValue.ToString());
                drwResult = FormControlComponents.OpenSearchForm(v_MasterLocationNoSecurity.TABLE_NAME, v_MasterLocationNoSecurity.CODE_FLD, txtDestMasLoc.Text, htbCondition, true);
                if (drwResult != null)
                    FillMasterLocationData(drwResult, false);
                else
                    txtDestMasLoc.Focus();
            }
            catch (PCSException ex)
            {
                PCSMessageBox.Show(ex.mCode, MessageBoxIcon.Error);
                try
                {
                    Logger.LogMessage(ex.CauseException, METHOD_NAME, Level.ERROR);
                }
                catch
                {
                    PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxIcon.Error);
                }
            }
            catch (Exception ex)
            {
                PCSMessageBox.Show(ErrorCode.OTHER_ERROR, MessageBoxIcon.Error);
                try
                {
                    Logger.LogMessage(ex, METHOD_NAME, Level.ERROR);
                }
                catch
                {
                    PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxIcon.Error);
                }
            }
        }

        private void btnDestLoc_Click(object sender, System.EventArgs e)
        {
            const string METHOD_NAME = THIS + ".btnDestLoc_Click()";
            try
            {
                if (txtDestMasLoc.Tag == null)
                {
                    string[] msgs = { lblDestMasLoc.Text, lblDestLoc.Text };
                    PCSMessageBox.Show(ErrorCode.MESSAGE_SELECT_ONE_BEFORE_SELECT_ONE, MessageBoxIcon.Warning, msgs);
                    if (txtDestLoc.Text != string.Empty)
                        txtDestLoc.Focus();
                    else
                        txtDestMasLoc.Focus();
                    return;
                }
                DataRowView drwResult = null;
                Hashtable htbCondition = new Hashtable();
                htbCondition.Add(MST_LocationTable.MASTERLOCATIONID_FLD, txtDestMasLoc.Tag.ToString());
                drwResult = FormControlComponents.OpenSearchForm(v_LocationNoScecurity.TABLE_NAME, MST_LocationTable.CODE_FLD, txtDestLoc.Text, htbCondition, true);
                if (drwResult != null)
                    FillLocationData(drwResult, false);
                else
                    txtDestLoc.Focus();
            }
            catch (PCSException ex)
            {
                PCSMessageBox.Show(ex.mCode, MessageBoxIcon.Error);
                try
                {
                    Logger.LogMessage(ex.CauseException, METHOD_NAME, Level.ERROR);
                }
                catch
                {
                    PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxIcon.Error);
                }
            }
            catch (Exception ex)
            {
                PCSMessageBox.Show(ErrorCode.OTHER_ERROR, MessageBoxIcon.Error);
                try
                {
                    Logger.LogMessage(ex, METHOD_NAME, Level.ERROR);
                }
                catch
                {
                    PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxIcon.Error);
                }
            }
        }

        private void btnDestBin_Click(object sender, System.EventArgs e)
        {
            const string METHOD_NAME = THIS + ".btnSourceBin_Click()";
            try
            {
                if (txtPurpose.Tag == null)
                {
                    string[] msgs = { lblPurpose.Text, lblDestBin.Text };
                    PCSMessageBox.Show(ErrorCode.MESSAGE_SELECT_ONE_BEFORE_SELECT_ONE, MessageBoxIcon.Warning, msgs);
                    if (txtDestBin.Text != string.Empty)
                        txtDestBin.Focus();
                    else
                        txtPurpose.Focus();
                    return;
                }

                if (txtDestLoc.Tag == null)
                {
                    string[] msgs = { lblDestLoc.Text, lblDestBin.Text };
                    PCSMessageBox.Show(ErrorCode.MESSAGE_SELECT_ONE_BEFORE_SELECT_ONE, MessageBoxIcon.Warning, msgs);
                    if (txtDestBin.Text != string.Empty)
                        txtDestBin.Focus();
                    else
                        txtDestLoc.Focus();
                    return;
                }
                DataRowView drwResult = SearchDestBin(true);
                if (drwResult != null)
                    FillBinData(drwResult, false);
                else
                    txtDestBin.Focus();
            }
            catch (PCSException ex)
            {
                PCSMessageBox.Show(ex.mCode, MessageBoxIcon.Error);
                try
                {
                    Logger.LogMessage(ex.CauseException, METHOD_NAME, Level.ERROR);
                }
                catch
                {
                    PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxIcon.Error);
                }
            }
            catch (Exception ex)
            {
                PCSMessageBox.Show(ErrorCode.OTHER_ERROR, MessageBoxIcon.Error);
                try
                {
                    Logger.LogMessage(ex, METHOD_NAME, Level.ERROR);
                }
                catch
                {
                    PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxIcon.Error);
                }
            }
        }

        private void btnAdd_Click(object sender, System.EventArgs e)
        {
            const string METHOD_NAME = THIS + ".btnAdd_Click()";
            try
            {
                ResetForm();
                FormMode = EnumAction.Add;
                dtmPostDate.Value = dtmValidDate = new UtilsBO().GetDBDate();

                txtTransNo.Text = FormControlComponents.GetNoByMask(this);
                //Fill Default Master Location 
                FormControlComponents.SetDefaultMasterLocation(txtSourceMasLoc);
                strLastValidSouceMasLoc = txtSourceMasLoc.Text;

                CreateDataSet();
                dgrdData.DataSource = dstData.Tables[0];
                FormControlComponents.RestoreGridLayout(dgrdData, dtbGridLayout);
                SwitchFormMode();
                dtmPostDate.Focus();

                DisableDestintion(0);

                // reset variable
                ResetVariable();
            }
            catch (PCSException ex)
            {
                PCSMessageBox.Show(ex.mCode, MessageBoxIcon.Error);
                try
                {
                    Logger.LogMessage(ex.CauseException, METHOD_NAME, Level.ERROR);
                }
                catch
                {
                    PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxIcon.Error);
                }
            }
            catch (Exception ex)
            {
                PCSMessageBox.Show(ErrorCode.OTHER_ERROR, MessageBoxIcon.Error);
                try
                {
                    Logger.LogMessage(ex, METHOD_NAME, Level.ERROR);
                }
                catch
                {
                    PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxIcon.Error);
                }
            }

        }

        private void ResetVariable()
        {
            strLastValidSourceBin = string.Empty;
            strLastValidDestBin = string.Empty;
            strLastValidDestLoc = string.Empty;
            strLastValidSourceLoc = string.Empty;
            strLastValidDestMasLoc = string.Empty;
            strLastValidPurpose = string.Empty;
            strLastValidPartyName = string.Empty;
            strLastValidPartyCode = string.Empty;
        }

        /// <summary>
        /// Save event:
        ///		Check data & call method to save into DB
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnSave_Click(object sender, System.EventArgs e)
        {
            const string METHOD_NAME = THIS + ".btnSave_Click()";
            DataSet dstTemp = null;
            blnHasError = true;
            try
            {
                DialogResult dlgResult = PCSMessageBox.Show(ErrorCode.MESSAGE_CONFIRM_BEFORE_SAVE_DATA, MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button2);
                if (dlgResult == DialogResult.No)
                    return;
                if (Security.IsDifferencePrefix(this, lblTransNo, txtTransNo))
                    return;

                if (!dgrdData.EditActive && ValidateData())
                {
                    dgrdData.UpdateData();
                    dstTemp = dstData.Copy();
                    decimal decQuantity;
                    FillDataToVOObject();
                    // synchronyze data
                    FormControlComponents.SynchronyGridData(dgrdData);
                    voMiscellaneousMaster.MiscellaneousIssueMasterID = boMiscellaneousIssue.Insert(voMiscellaneousMaster, dstData, out decQuantity,Convert.ToInt32(txtPurpose.Tag.ToString()));

                    PCSMessageBox.Show(ErrorCode.MESSAGE_AFTER_SAVE_DATA);
                    FormMode = EnumAction.Default;
                    SwitchFormMode();
                    blnHasError = false;
                    txtTransNo.Tag = voMiscellaneousMaster.MiscellaneousIssueMasterID;
               
                }
            }
            catch (PCSException ex)
            {
                if (ex.mCode == ErrorCode.MESSAGE_NOT_ENOUGH_COMPONENT_TO_COMPLETE)
                {

                    string[] strParam = new string[1];
                    strParam[0] = ex.mMethod;
                    //Show message
                    PCSMessageBox.Show(ErrorCode.MESSAGE_NOT_ENOUGH_QUANTITY_OF_COMPONENT_TO_COMPLETE, MessageBoxIcon.Warning, strParam);
                    //End hacked.
                }
                try
                {
                    Logger.LogMessage(ex.CauseException, METHOD_NAME, Level.ERROR);
                }
                catch
                {
                    PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxIcon.Error);
                }
                if (ex.mCode == ErrorCode.DUPLICATE_KEY)
                {
                    PCSMessageBox.Show(ErrorCode.DUPLICATE_KEY, MessageBoxIcon.Error);
                    txtTransNo.Focus();
                }
                else if (ex.mCode == ErrorCode.MESSAGE_MATERIALISSUE_INVALID_ISSUE_QTY
                    || ex.mCode == ErrorCode.MESSAGE_AVAILABLE_WAS_USED_AFTER_POSTDATE)
                {
                    PCSMessageBox.Show(ex.mCode, MessageBoxIcon.Error);
                    dstData = dstTemp.Copy();
                    dgrdData.Refresh();
                    for (int i = 0; i < dgrdData.RowCount; i++)
                    {
                        if (dgrdData[i, IV_MiscellaneousIssueDetailTable.PRODUCTID_FLD].ToString() == ex.mMethod.ToString())
                        {
                            dgrdData.Row = i;
                            dgrdData.Col = dgrdData.Columns.IndexOf(dgrdData.Columns[PART_NUMBER_FLD]);
                            // update new available quantity, fix bug 3672 from thuypt
                            if (txtSourceBin.Text.Trim() != string.Empty)
                            {
                                //get Availbale by PostDate
                                dgrdData[i, IV_MiscellaneousIssueDetailTable.AVAILABLEQTY_FLD] = boIVUtils.GetAvailableQtyByPostDate(dtmCurrentDate, int.Parse(cboCCN.SelectedValue.ToString()), (int)txtSourceMasLoc.Tag, (int)txtSourceLoc.Tag, (int)txtSourceBin.Tag, int.Parse(dgrdData[i, ITM_ProductTable.PRODUCTID_FLD].ToString()));
                            }
                            else
                                dgrdData[i, IV_MiscellaneousIssueDetailTable.AVAILABLEQTY_FLD] = boIVUtils.GetAvailableQtyByPostDate(dtmCurrentDate, int.Parse(cboCCN.SelectedValue.ToString()), (int)txtSourceMasLoc.Tag, (int)txtSourceLoc.Tag, 0, int.Parse(dgrdData[i, ITM_ProductTable.PRODUCTID_FLD].ToString()));
                            dgrdData.Focus();
                            dstData = dstData.Copy();
                            break;
                        }
                    }
                }
                else
                    PCSMessageBox.Show(ex.mCode, MessageBoxIcon.Error);
            }
            catch (Exception ex)
            {
                PCSMessageBox.Show(ErrorCode.OTHER_ERROR, MessageBoxIcon.Error);
                try
                {
                    Logger.LogMessage(ex, METHOD_NAME, Level.ERROR);
                }
                catch
                {
                    PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxIcon.Error);
                }
            }
        }
        private void btnDelete_Click(object sender, System.EventArgs e)
        {
            const string METHOD_NAME = THIS + ".btnDelete_Click()";
            try
            {
                if (PCSMessageBox.Show(ErrorCode.MESSAGE_DELETE_RECORD, MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
                {
                    FormMode = EnumAction.Delete;
                    // Delete MiscellaneousIssue
                    boMiscellaneousIssue.DeleteMiscellaneousIssue(int.Parse(txtTransNo.Tag.ToString()));

                    FormMode = EnumAction.Default;

                    BindDataToGrid(0);
                    //Reset Form
                    ResetForm();
                    //Enable button
                    SwitchFormMode();
                    PCSMessageBox.Show(ErrorCode.MESSAGE_AFTER_SAVE_DATA, MessageBoxIcon.Information);
                }
            }
            catch (PCSException ex)
            {
                // displays the error message.
                PCSMessageBox.Show(ex.mCode, MessageBoxIcon.Error);
                // log message.
                try
                {
                    Logger.LogMessage(ex.CauseException, METHOD_NAME, Level.ERROR);
                }
                catch
                {
                    PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxIcon.Error);
                }
            }
            catch (Exception ex)
            {
                // displays the error message.
                PCSMessageBox.Show(ErrorCode.OTHER_ERROR, MessageBoxIcon.Error);
                // log message.
                try
                {
                    Logger.LogMessage(ex, METHOD_NAME, Level.ERROR);
                }
                catch
                {
                    PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxIcon.Error);
                }
            }
        }

        private void btnClose_Click(object sender, System.EventArgs e)
        {
            this.Close();
        }
        private void btnParty_Click(object sender, System.EventArgs e)
        {
            const string METHOD_NAME = THIS + ".btnParty_Click()";
            try
            {
                if (txtPurpose.Tag == null)
                {
                    string[] msgs = { lblPurpose.Text, lblParty.Text };
                    PCSMessageBox.Show(ErrorCode.MESSAGE_SELECT_ONE_BEFORE_SELECT_ONE, MessageBoxIcon.Warning, msgs);
                    if (txtParty.Text != string.Empty)
                        txtParty.Focus();
                    else
                        txtPurpose.Focus();
                    return;
                }
                int intPurposeCode = Convert.ToInt32(txtPurpose.Tag);
                DataRowView drowView = SearchParty(intPurposeCode, MST_PartyTable.CODE_FLD, txtParty.Text.Trim(), true);
                if (drowView != null)
                    FillPartyData(drowView);
                else
                    txtParty.Focus();
            }
            catch (PCSException ex)
            {
                // Displays the error message if throwed from PCSException.
                PCSMessageBox.Show(ex.mCode, MessageBoxIcon.Error);
                try
                {
                    // Log error message into log file.
                    Logger.LogMessage(ex.CauseException, METHOD_NAME, Level.ERROR);
                }
                catch
                {
                    // Show message if logger has an error.
                    PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxIcon.Error);
                }
            }
            catch (Exception ex)
            {
                // Displays the error message if throwed from system.
                PCSMessageBox.Show(ErrorCode.OTHER_ERROR, MessageBoxIcon.Error);
                try
                {
                    // Log error message into log file.
                    Logger.LogMessage(ex, METHOD_NAME, Level.ERROR);
                }
                catch
                {
                    // Show message if logger has an error.
                    PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxIcon.Error);
                }
            }
        }

        private void btnPartyName_Click(object sender, System.EventArgs e)
        {
            const string METHOD_NAME = THIS + ".btnPartyName_Click()";
            try
            {
                if (txtPurpose.Tag == null)
                {
                    string[] msgs = { lblPurpose.Text, lblParty.Text };
                    PCSMessageBox.Show(ErrorCode.MESSAGE_SELECT_ONE_BEFORE_SELECT_ONE, MessageBoxIcon.Warning, msgs);
                    if (txtPartyName.Text != string.Empty)
                        txtPartyName.Focus();
                    else
                        txtPurpose.Focus();
                    return;
                }
                int intPurposeCode = Convert.ToInt32(txtPurpose.Tag);
                DataRowView drowView = SearchParty(intPurposeCode, MST_PartyTable.NAME_FLD, txtPartyName.Text.Trim(), true);
                if (drowView != null)
                    FillPartyData(drowView);
                else
                    txtPartyName.Focus();
            }
            catch (PCSException ex)
            {
                // Displays the error message if throwed from PCSException.
                PCSMessageBox.Show(ex.mCode, MessageBoxIcon.Error);
                try
                {
                    // Log error message into log file.
                    Logger.LogMessage(ex.CauseException, METHOD_NAME, Level.ERROR);
                }
                catch
                {
                    // Show message if logger has an error.
                    PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxIcon.Error);
                }
            }
            catch (Exception ex)
            {
                // Displays the error message if throwed from system.
                PCSMessageBox.Show(ErrorCode.OTHER_ERROR, MessageBoxIcon.Error);
                try
                {
                    // Log error message into log file.
                    Logger.LogMessage(ex, METHOD_NAME, Level.ERROR);
                }
                catch
                {
                    // Show message if logger has an error.
                    PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxIcon.Error);
                }
            }
        }

        private void btnPrint_Click(object sender, System.EventArgs e)
        {
            const string METHOD_NAME = THIS + ".btnPrint_Click()";
            this.Cursor = Cursors.WaitCursor;
            try
            {
                //exit if no item was selected
                if (txtTransNo.Tag == null || txtPurpose.Tag == null)
                    return;
                //exit if have no purpose
                if (txtPurpose.Tag == null || txtPurpose.Tag == DBNull.Value)
                    return;

                int intPurposeID = int.Parse(txtPurpose.Tag.ToString());

                switch (intPurposeID)
                {
                    case (int)PurposeEnum.Scrap:
                        ShowDestroySlipReport(sender, e);
                        break;
                    case (int)PurposeEnum.Outside:
                        ShowDelivery2OutsourcingReport(sender, e);
                        break;
                    default:
                        ShowIssueForRequiredMaterial(sender, e);
                        break;

                }
            }
            catch (PCSException ex)
            {
                // Displays the error message if throwed from PCSException.
                PCSMessageBox.Show(ex.mCode, MessageBoxIcon.Error);
                try
                {
                    // Log error message into log file.
                    Logger.LogMessage(ex.CauseException, METHOD_NAME, Level.ERROR);
                }
                catch
                {
                    // Show message if logger has an error.
                    PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxIcon.Error);
                }
            }
            catch (Exception ex)
            {
                // Displays the error message if throwed from system.
                PCSMessageBox.Show(ErrorCode.OTHER_ERROR, MessageBoxIcon.Error);
                try
                {
                    // Log error message into log file.
                    Logger.LogMessage(ex, METHOD_NAME, Level.ERROR);
                }
                catch
                {
                    // Show message if logger has an error.
                    PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxIcon.Error);
                }
            }
            finally
            {
                this.Cursor = Cursors.Default;
            }
        }

        private void btnFGoodsCode_Click(object sender, System.EventArgs e)
        {
            const string METHOD_NAME = THIS + ".btnFGoodsCode_Click()";
            try
            {
                if (txtSourceLoc.Text.Trim() == string.Empty)
                {
                    //PCSMessageBox.Show(ErrorCode.messAGE_musT_sele);
                    txtSourceLoc.Focus();
                    return;
                }
                DataRowView drwResult = null;
                //Hashtable htbCondition = new Hashtable();
                string strCondition = SO_SaleOrderDetailTable.TABLE_NAME + "." + SO_SaleOrderDetailTable.FGOODSCODE_FLD + " <> ''";
                drwResult = FormControlComponents.OpenSearchForm(SO_SaleOrderDetailTable.TABLE_NAME, SO_SaleOrderDetailTable.FGOODSCODE_FLD, txtFGoodsCode.Text.Trim(), strCondition);
                if (drwResult != null)
                    FillSaleData(drwResult);
                else
                    txtFGoodsCode.Focus();
            }
            catch (PCSException ex)
            {
                PCSMessageBox.Show(ex.mCode, MessageBoxIcon.Error);
                try
                {
                    Logger.LogMessage(ex.CauseException, METHOD_NAME, Level.ERROR);
                }
                catch
                {
                    PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION);
                }
            }
            catch (Exception ex)
            {
                PCSMessageBox.Show(ErrorCode.OTHER_ERROR);
                try
                {
                    Logger.LogMessage(ex, METHOD_NAME, Level.ERROR);
                }
                catch
                {
                    PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION);
                }
            }
        }

        private void btnRequireMaterialNo_Click(object sender, System.EventArgs e)
        {
            const string METHOD_NAME = THIS + ".btnRequireMaterialNo_Click()";
            try
            {
                if (txtSourceBin.Text.Trim() == string.Empty)
                {
                    string[] msgs = { lblSourceBin.Text, lblRequireMaterialNo.Text };
                    PCSMessageBox.Show(ErrorCode.MESSAGE_SELECT_ONE_BEFORE_SELECT_ONE, MessageBoxIcon.Warning, msgs);
                    txtFGoodsCode.Focus();
                    return;
                }
                if (txtFGoodsCode.Text.Trim() == string.Empty)
                {
                    string[] msgs = { lblFGoodsCode.Text, lblRequireMaterialNo.Text };
                    PCSMessageBox.Show(ErrorCode.MESSAGE_SELECT_ONE_BEFORE_SELECT_ONE, MessageBoxIcon.Warning, msgs);
                    txtFGoodsCode.Focus();
                    return;
                }
                Hashtable htbCriterial = new Hashtable();
                DataRowView drwResult = null;
                htbCriterial.Add(PRO_RequiredMaterialMasterTable.SALEORDERDETAILID_FLD, txtFGoodsCode.Tag.ToString());

                drwResult = FormControlComponents.OpenSearchForm(REQUIRED_MATERIAL_VIEW, PRO_RequiredMaterialMasterTable.TRANSNO_FLD, txtRequireMaterialNo.Text, htbCriterial, true);
                if (drwResult != null)
                    FillRequiredMaterialData(drwResult);
                else
                    txtRequireMaterialNo.Focus();
            }
            catch (PCSException ex)
            {
                PCSMessageBox.Show(ex.mCode, MessageBoxIcon.Error);
                try
                {
                    Logger.LogMessage(ex.CauseException, METHOD_NAME, Level.ERROR);
                }
                catch
                {
                    PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION);
                }
            }
            catch (Exception ex)
            {
                PCSMessageBox.Show(ErrorCode.OTHER_ERROR);
                try
                {
                    Logger.LogMessage(ex, METHOD_NAME, Level.ERROR);
                }
                catch
                {
                    PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION);
                }
            }
        }

        #endregion

        #region Control's leaving event

        private void txtTransNo_Validating(object sender, System.ComponentModel.CancelEventArgs e)
        {
            const string METHOD_NAME = THIS + ".txtTransNo_Validating()";
            try
            {
                if (txtTransNo.Text.Trim() == string.Empty)
                {
                    if (FormMode == EnumAction.Default)
                    {
                        ResetForm();
                        CreateDataSet();
                        dgrdData.DataSource = dstData.Tables[0];
                        FormControlComponents.RestoreGridLayout(dgrdData, dtbGridLayout);
                        SwitchFormMode();
                    }
                    return;
                }
                if (!txtTransNo.Modified || FormMode == EnumAction.Add) return;
                Hashtable htbCriterial = new Hashtable();
                DataRowView drwResult = null;
                if (cboCCN.SelectedValue != null)
                {
                    htbCriterial.Add(IV_MiscellaneousIssueMasterTable.CCNID_FLD, cboCCN.SelectedValue.ToString());
                }
                else
                {
                    PCSMessageBox.Show(ErrorCode.MESSAGE_RGA_CCN, MessageBoxIcon.Warning);
                    e.Cancel = true;
                    return;
                }
                drwResult = FormControlComponents.OpenSearchForm(IV_MiscellaneousIssueMasterTable.TABLE_NAME, IV_MiscellaneousIssueMasterTable.TRANSNO_FLD, txtTransNo.Text.Trim(), htbCriterial, false);
                if (drwResult != null)
                {
                    txtTransNo.Text = drwResult[IV_MiscellaneousIssueMasterTable.TRANSNO_FLD].ToString().Trim();
                    txtTransNo.Tag = drwResult[IV_MiscellaneousIssueMasterTable.MISCELLANEOUSISSUEMASTERID_FLD].ToString().Trim();
                    // Fill FGoodsCode
                    try
                    {
                        txtFGoodsCode.Tag = (int)drwResult[IV_MiscellaneousIssueMasterTable.SALEORDERDETAILID_FLD];
                        SO_SaleOrderDetail  voSaleDetail = new SaleOrderBO().GetSaleOrderDetail(Convert.ToInt32(txtFGoodsCode.Tag));
                        txtFGoodsCode.Text = voSaleDetail.FGoodsCode;
                    }
                    catch
                    {
                        txtFGoodsCode.Tag = null;
                        txtFGoodsCode.Text = string.Empty;
                    }
                    BindDataToGrid(int.Parse(txtTransNo.Tag.ToString()));
                }
                else
                    e.Cancel = true;
            }
            catch (PCSException ex)
            {
                PCSMessageBox.Show(ex.mCode, MessageBoxIcon.Error);
                try
                {
                    Logger.LogMessage(ex.CauseException, METHOD_NAME, Level.ERROR);
                }
                catch
                {
                    PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxIcon.Error);
                }
            }
            catch (Exception ex)
            {
                PCSMessageBox.Show(ErrorCode.OTHER_ERROR, MessageBoxIcon.Error);
                try
                {
                    Logger.LogMessage(ex, METHOD_NAME, Level.ERROR);
                }
                catch
                {
                    PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxIcon.Error);
                }
            }
        }

        private void txtPurpose_Validating(object sender, System.ComponentModel.CancelEventArgs e)
        {
            const string METHOD_NAME = THIS + ".txtPurpose_Validating()";
            try
            {
                if (txtPurpose.Text.Trim() == string.Empty)
                {
                    txtPurpose.Tag = null;
                    DisableDestintion(0);
                    // clear source and destination bin
                    ChangePurpose();
                    strLastValidPurpose = string.Empty;
                    return;
                }
                if (strLastValidPurpose == txtPurpose.Text.Trim()) return;
                DataRowView drowView = SearchPurpose(false);
                if (drowView != null)
                    FillPurposeData(drowView);
                else
                    e.Cancel = true;
            }
            catch (PCSException ex)
            {
                // Displays the error message if throwed from PCSException.
                PCSMessageBox.Show(ex.mCode, MessageBoxIcon.Error);
                try
                {
                    // Log error message into log file.
                    Logger.LogMessage(ex.CauseException, METHOD_NAME, Level.ERROR);
                }
                catch
                {
                    // Show message if logger has an error.
                    PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxIcon.Error);
                }
            }
            catch (Exception ex)
            {
                // Displays the error message if throwed from system.
                PCSMessageBox.Show(ErrorCode.OTHER_ERROR, MessageBoxIcon.Error);
                try
                {
                    // Log error message into log file.
                    Logger.LogMessage(ex, METHOD_NAME, Level.ERROR);
                }
                catch
                {
                    // Show message if logger has an error.
                    PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxIcon.Error);
                }
            }
        }

        private void txtSourceMasLoc_Validating(object sender, System.ComponentModel.CancelEventArgs e)
        {
            const string METHOD_NAME = THIS + ".txtMasterLocation_Leave()";
            try
            {
                if (txtSourceMasLoc.Text.Trim() == string.Empty)
                {
                    ClearFormIfSourceMasLocChange();
                    txtSourceMasLoc.Tag = null;
                    strLastValidSouceMasLoc = string.Empty;
                    return;
                }
                if (strLastValidSouceMasLoc == txtSourceMasLoc.Text.Trim()) return;
                if (cboCCN.SelectedValue == null)
                {
                    PCSMessageBox.Show(ErrorCode.MESSAGE_RGA_CCN, MessageBoxIcon.Warning);
                    e.Cancel = true;
                    return;
                }
                Hashtable htbCriteria = new Hashtable();
                htbCriteria.Add(MST_MasterLocationTable.CCNID_FLD, cboCCN.SelectedValue);
                DataRowView drwResult = FormControlComponents.OpenSearchForm(MST_MasterLocationTable.TABLE_NAME, MST_MasterLocationTable.CODE_FLD, txtSourceMasLoc.Text.Trim(), htbCriteria, false);
                if (drwResult != null)
                    FillMasterLocationData(drwResult, true);
                else
                    e.Cancel = true;
            }
            catch (PCSException ex)
            {
                PCSMessageBox.Show(ex.mCode, MessageBoxIcon.Error);
                try
                {
                    Logger.LogMessage(ex.CauseException, METHOD_NAME, Level.ERROR);
                }
                catch
                {
                    PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxIcon.Error);
                }
            }
            catch (Exception ex)
            {
                PCSMessageBox.Show(ErrorCode.OTHER_ERROR, MessageBoxIcon.Error);
                try
                {
                    Logger.LogMessage(ex, METHOD_NAME, Level.ERROR);
                }
                catch
                {
                    PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxIcon.Error);
                }
            }
        }

        private void txtSourceLoc_Validating(object sender, System.ComponentModel.CancelEventArgs e)
        {
            const string METHOD_NAME = THIS + ".txtSourceLoc_Validating()";
            try
            {
                if (txtSourceLoc.Text.Trim() == string.Empty)
                {
                    txtSourceLoc.Tag = null;
                    // clear data
                    ClearFormIfSourceLocChange();
                    // assign new valid source location
                    strLastValidSourceLoc = string.Empty;
                    return;
                }
                if (strLastValidSourceLoc == txtSourceLoc.Text.Trim()) return;
                if (txtSourceMasLoc.Tag == null)
                {
                    string[] msgs = { lblSourceMasLoc.Text, lblSourceLoc.Text };
                    PCSMessageBox.Show(ErrorCode.MESSAGE_SELECT_ONE_BEFORE_SELECT_ONE, MessageBoxIcon.Warning, msgs);
                    e.Cancel = true;
                    return;
                }
                DataRowView drwResult = null;
                Hashtable htbCondition = new Hashtable();
                htbCondition.Add(MST_LocationTable.MASTERLOCATIONID_FLD, txtSourceMasLoc.Tag.ToString());
                drwResult = FormControlComponents.OpenSearchForm(MST_LocationTable.TABLE_NAME, MST_LocationTable.CODE_FLD, txtSourceLoc.Text, htbCondition, false);
                if (drwResult != null)
                    FillLocationData(drwResult, true);
                else
                    e.Cancel = true;
            }
            catch (PCSException ex)
            {
                PCSMessageBox.Show(ex.mCode, MessageBoxIcon.Error);
                try
                {
                    Logger.LogMessage(ex.CauseException, METHOD_NAME, Level.ERROR);
                }
                catch
                {
                    PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxIcon.Error);
                }
            }
            catch (Exception ex)
            {
                PCSMessageBox.Show(ErrorCode.OTHER_ERROR, MessageBoxIcon.Error);
                try
                {
                    Logger.LogMessage(ex, METHOD_NAME, Level.ERROR);
                }
                catch
                {
                    PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxIcon.Error);
                }
            }
        }

        private void txtSourceBin_Validating(object sender, System.ComponentModel.CancelEventArgs e)
        {
            const string METHOD_NAME = THIS + ".txtSourceBin_Validating()";
            try
            {
                if (txtSourceBin.Text.Trim() == string.Empty)
                {
                    txtSourceBin.Tag = null;
                    // update grid
                    UpdateGridWhenChangeSouceBin(0);
                    // assign new valid source bin
                    strLastValidSourceBin = txtSourceBin.Text;
                    return;
                }
                if (txtPurpose.Tag == null)
                {
                    string[] msgs = { lblPurpose.Text, lblSourceBin.Text };
                    PCSMessageBox.Show(ErrorCode.MESSAGE_SELECT_ONE_BEFORE_SELECT_ONE, MessageBoxIcon.Warning, msgs);
                    e.Cancel = true;
                    return;
                }

                if (txtSourceLoc.Tag == null)
                {
                    string[] msgs = { lblSourceLoc.Text, lblSourceBin.Text };
                    PCSMessageBox.Show(ErrorCode.MESSAGE_SELECT_ONE_BEFORE_SELECT_ONE, MessageBoxIcon.Warning, msgs);
                    e.Cancel = true;
                    return;
                }
                DataRowView drwResult = SearchSourceBin(false);
                if (drwResult != null)
                    FillBinData(drwResult, true);
                else
                    txtSourceBin.Focus();
            }
            catch (PCSException ex)
            {
                PCSMessageBox.Show(ex.mCode, MessageBoxIcon.Error);
                try
                {
                    Logger.LogMessage(ex.CauseException, METHOD_NAME, Level.ERROR);
                }
                catch
                {
                    PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxIcon.Error);
                }
            }
            catch (Exception ex)
            {
                PCSMessageBox.Show(ErrorCode.OTHER_ERROR, MessageBoxIcon.Error);
                try
                {
                    Logger.LogMessage(ex, METHOD_NAME, Level.ERROR);
                }
                catch
                {
                    PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxIcon.Error);
                }
            }
        }

        private void txtDestMasLoc_Validating(object sender, System.ComponentModel.CancelEventArgs e)
        {
            const string METHOD_NAME = THIS + ".txtDestMasLoc_Validating()";
            try
            {
                if (txtDestMasLoc.Text.Trim() == string.Empty)
                {
                    txtDestMasLoc.Tag = null;
                    ClearFormIfDestMasLocChange();
                    strLastValidDestMasLoc = string.Empty;
                    return;
                }
                if (strLastValidDestMasLoc == txtDestMasLoc.Text.Trim()) return;
                if (cboCCN.SelectedValue == null)
                {
                    PCSMessageBox.Show(ErrorCode.MESSAGE_RGA_CCN, MessageBoxIcon.Warning);
                    e.Cancel = true;
                    return;
                }
                Hashtable htbCondition = new Hashtable();
                htbCondition.Add(MST_MasterLocationTable.CCNID_FLD, cboCCN.SelectedValue.ToString());
                DataRowView drwResult = drwResult = FormControlComponents.OpenSearchForm(MST_MasterLocationTable.TABLE_NAME, MST_MasterLocationTable.CODE_FLD, txtDestMasLoc.Text, htbCondition, false);
                if (drwResult != null)
                    FillMasterLocationData(drwResult, false);
                else
                    e.Cancel = true;
            }
            catch (PCSException ex)
            {
                PCSMessageBox.Show(ex.mCode, MessageBoxIcon.Error);
                try
                {
                    Logger.LogMessage(ex.CauseException, METHOD_NAME, Level.ERROR);
                }
                catch
                {
                    PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxIcon.Error);
                }
            }
            catch (Exception ex)
            {
                PCSMessageBox.Show(ErrorCode.OTHER_ERROR, MessageBoxIcon.Error);
                try
                {
                    Logger.LogMessage(ex, METHOD_NAME, Level.ERROR);
                }
                catch
                {
                    PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxIcon.Error);
                }
            }
        }

        private void txtDestLoc_Validating(object sender, System.ComponentModel.CancelEventArgs e)
        {
            const string METHOD_NAME = THIS + ".txtDestLoc_Validating()";
            try
            {
                if (txtDestLoc.Text.Trim() == string.Empty)
                {
                    txtDestLoc.Tag = null;
                    ClearFormIfDestLocChange();
                    strLastValidDestLoc = string.Empty;
                    return;
                }
                if (strLastValidDestLoc == txtDestLoc.Text.Trim()) return;
                if (txtDestMasLoc.Tag == null)
                {
                    string[] msgs = { lblDestMasLoc.Text, lblDestLoc.Text };
                    PCSMessageBox.Show(ErrorCode.MESSAGE_SELECT_ONE_BEFORE_SELECT_ONE, MessageBoxIcon.Warning, msgs);
                    e.Cancel = true;
                    return;
                }
                DataRowView drwResult = null;
                Hashtable htbCondition = new Hashtable();
                htbCondition.Add(MST_LocationTable.MASTERLOCATIONID_FLD, txtDestMasLoc.Tag.ToString());
                drwResult = FormControlComponents.OpenSearchForm(MST_LocationTable.TABLE_NAME, MST_LocationTable.CODE_FLD, txtDestLoc.Text, htbCondition, false);
                if (drwResult != null)
                    FillLocationData(drwResult, false);
                else
                    e.Cancel = true;
            }
            catch (PCSException ex)
            {
                PCSMessageBox.Show(ex.mCode, MessageBoxIcon.Error);
                try
                {
                    Logger.LogMessage(ex.CauseException, METHOD_NAME, Level.ERROR);
                }
                catch
                {
                    PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxIcon.Error);
                }
            }
            catch (Exception ex)
            {
                PCSMessageBox.Show(ErrorCode.OTHER_ERROR, MessageBoxIcon.Error);
                try
                {
                    Logger.LogMessage(ex, METHOD_NAME, Level.ERROR);
                }
                catch
                {
                    PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxIcon.Error);
                }
            }
        }

        private void txtDestBin_Validating(object sender, System.ComponentModel.CancelEventArgs e)
        {
            const string METHOD_NAME = THIS + ".txtDestBin_Validating()";
            try
            {
                if (txtDestBin.Text.Trim() == string.Empty)
                {
                    txtDestBin.Tag = null;
                    strLastValidDestBin = string.Empty;
                    return;
                }
                if (txtDestBin.Text.Trim().Equals(strLastValidDestBin)) return;
                if (txtPurpose.Tag == null)
                {
                    string[] msgs = { lblPurpose.Text, lblDestBin.Text };
                    PCSMessageBox.Show(ErrorCode.MESSAGE_SELECT_ONE_BEFORE_SELECT_ONE, MessageBoxIcon.Warning, msgs);
                    e.Cancel = true;
                    return;
                }

                if (txtDestLoc.Tag == null)
                {
                    string[] msgs = { lblDestLoc.Text, lblDestBin.Text };
                    PCSMessageBox.Show(ErrorCode.MESSAGE_SELECT_ONE_BEFORE_SELECT_ONE, MessageBoxIcon.Warning, msgs);
                    e.Cancel = true;
                    return;
                }
                DataRowView drwResult = SearchDestBin(false);
                if (drwResult != null)
                    FillBinData(drwResult, false);
                else
                    e.Cancel = true;
            }
            catch (PCSException ex)
            {
                PCSMessageBox.Show(ex.mCode, MessageBoxIcon.Error);
                try
                {
                    Logger.LogMessage(ex.CauseException, METHOD_NAME, Level.ERROR);
                }
                catch
                {
                    PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxIcon.Error);
                }
            }
            catch (Exception ex)
            {
                PCSMessageBox.Show(ErrorCode.OTHER_ERROR, MessageBoxIcon.Error);
                try
                {
                    Logger.LogMessage(ex, METHOD_NAME, Level.ERROR);
                }
                catch
                {
                    PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxIcon.Error);
                }
            }
        }

        private void txtParty_Validating(object sender, System.ComponentModel.CancelEventArgs e)
        {
            const string METHOD_NAME = THIS + ".txtParty_Validating()";
            try
            {
                if (txtParty.Text.Trim() == string.Empty)
                {
                    txtParty.Tag = null;
                    txtPartyName.Text = string.Empty;
                    strLastValidPartyCode = string.Empty;
                    strLastValidPartyName = string.Empty;
                    return;
                }
                if (strLastValidPartyCode == txtParty.Text.Trim()) return;
                if (txtPurpose.Tag == null)
                {
                    string[] msgs = { lblPurpose.Text, lblParty.Text };
                    PCSMessageBox.Show(ErrorCode.MESSAGE_SELECT_ONE_BEFORE_SELECT_ONE, MessageBoxIcon.Warning, msgs);
                    e.Cancel = true;
                    return;
                }
                int intPurposeCode = Convert.ToInt32(txtPurpose.Tag);
                DataRowView drowView = SearchParty(intPurposeCode, MST_PartyTable.CODE_FLD, txtParty.Text.Trim(), false);
                if (drowView != null)
                    FillPartyData(drowView);
                else
                    e.Cancel = true;
            }
            catch (PCSException ex)
            {
                // Displays the error message if throwed from PCSException.
                PCSMessageBox.Show(ex.mCode, MessageBoxIcon.Error);
                try
                {
                    // Log error message into log file.
                    Logger.LogMessage(ex.CauseException, METHOD_NAME, Level.ERROR);
                }
                catch
                {
                    // Show message if logger has an error.
                    PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxIcon.Error);
                }
            }
            catch (Exception ex)
            {
                // Displays the error message if throwed from system.
                PCSMessageBox.Show(ErrorCode.OTHER_ERROR, MessageBoxIcon.Error);
                try
                {
                    // Log error message into log file.
                    Logger.LogMessage(ex, METHOD_NAME, Level.ERROR);
                }
                catch
                {
                    // Show message if logger has an error.
                    PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxIcon.Error);
                }
            }
        }
        private void txtPartyName_Validating(object sender, System.ComponentModel.CancelEventArgs e)
        {
            const string METHOD_NAME = THIS + ".txtPartyName_Validating()";
            try
            {
                if (txtPartyName.Text.Trim() == string.Empty)
                {
                    txtParty.Tag = null;
                    txtParty.Text = string.Empty;
                    strLastValidPartyCode = string.Empty;
                    strLastValidPartyName = string.Empty;
                    return;
                }
                if (strLastValidPartyName == txtPartyName.Text.Trim()) return;
                if (txtPurpose.Tag == null)
                {
                    string[] msgs = { lblPurpose.Text, lblParty.Text };
                    PCSMessageBox.Show(ErrorCode.MESSAGE_SELECT_ONE_BEFORE_SELECT_ONE, MessageBoxIcon.Warning, msgs);
                    e.Cancel = true;
                    return;
                }
                int intPurposeCode = Convert.ToInt32(txtPurpose.Tag);
                DataRowView drowView = SearchParty(intPurposeCode, MST_PartyTable.NAME_FLD, txtPartyName.Text.Trim(), false);
                if (drowView != null)
                    FillPartyData(drowView);
                else
                    e.Cancel = true;
            }
            catch (PCSException ex)
            {
                // Displays the error message if throwed from PCSException.
                PCSMessageBox.Show(ex.mCode, MessageBoxIcon.Error);
                try
                {
                    // Log error message into log file.
                    Logger.LogMessage(ex.CauseException, METHOD_NAME, Level.ERROR);
                }
                catch
                {
                    // Show message if logger has an error.
                    PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxIcon.Error);
                }
            }
            catch (Exception ex)
            {
                // Displays the error message if throwed from system.
                PCSMessageBox.Show(ErrorCode.OTHER_ERROR, MessageBoxIcon.Error);
                try
                {
                    // Log error message into log file.
                    Logger.LogMessage(ex, METHOD_NAME, Level.ERROR);
                }
                catch
                {
                    // Show message if logger has an error.
                    PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxIcon.Error);
                }
            }
        }
        private void dtmPostDate_Validating(object sender, System.ComponentModel.CancelEventArgs e)
        {
            const string METHOD_NAME = THIS + ".dtmPostDate_Validating()";
            try
            {
                if (cboCCN.SelectedValue == DBNull.Value ||
                    txtSourceMasLoc.Tag == null ||
                    txtSourceLoc.Tag == null)
                    return;
                if (dtmValidDate.Equals(Convert.ToDateTime(dtmPostDate.Value)))
                    return;
                dtmValidDate = Convert.ToDateTime(dtmPostDate.Value);
                // update available quantity
                UpdateAvailableQuantityInGrid();
            }
            catch (PCSException ex)
            {
                PCSMessageBox.Show(ex.mCode, MessageBoxIcon.Error);
                try
                {
                    Logger.LogMessage(ex.CauseException, METHOD_NAME, Level.ERROR);
                }
                catch
                {
                    PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxIcon.Error);
                }
            }
            catch (Exception ex)
            {
                // error from date time control when user select date out of range
                if (ex.Message.Equals(dtmPostDate.PostValidation.ErrorMessage))
                    return;
                PCSMessageBox.Show(ErrorCode.OTHER_ERROR, MessageBoxIcon.Error);
                try
                {
                    Logger.LogMessage(ex, METHOD_NAME, Level.ERROR);
                }
                catch
                {
                    PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxIcon.Error);
                }
            }
        }

        private void txtFGoodsCode_Validating(object sender, System.ComponentModel.CancelEventArgs e)
        {
            const string METHOD_NAME = THIS + ".txtFGoodsCode_Validating()";
            try
            {
                if (!txtFGoodsCode.Modified)
                    return;
                if (txtFGoodsCode.Text.Trim() != string.Empty)
                {
                    string strCondition = SO_SaleOrderDetailTable.TABLE_NAME + "." + SO_SaleOrderDetailTable.FGOODSCODE_FLD + " <> ''";
                    var drwResult = FormControlComponents.OpenSearchFormWhere(SO_SaleOrderDetailTable.TABLE_NAME, 
                        SO_SaleOrderDetailTable.FGOODSCODE_FLD, txtFGoodsCode.Text.Trim(), strCondition, false);
                    if (drwResult != null)
                        FillSaleData(drwResult);
                    else
                        e.Cancel = true;
                }
                else
                    FillSaleData(null);
            }
            catch (PCSException ex)
            {
                PCSMessageBox.Show(ex.mCode, MessageBoxIcon.Error);
                try
                {
                    Logger.LogMessage(ex.CauseException, METHOD_NAME, Level.ERROR);
                }
                catch
                {
                    PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION);
                }
            }
            catch (Exception ex)
            {
                PCSMessageBox.Show(ErrorCode.OTHER_ERROR);
                try
                {
                    Logger.LogMessage(ex, METHOD_NAME, Level.ERROR);
                }
                catch
                {
                    PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION);
                }
            }
        }
        private void txtRequireMaterialNo_Validating(object sender, System.ComponentModel.CancelEventArgs e)
        {
            const string METHOD_NAME = THIS + ".txtRequireMaterialNo_Validating()";
            try
            {
                if (!txtRequireMaterialNo.Modified)
                    return;
                if (txtRequireMaterialNo.Text.Trim() == string.Empty)
                {
                    FillRequiredMaterialData(null);
                    return;
                }
                if (txtSourceBin.Text.Trim() == string.Empty)
                {
                    string[] msgs = { lblSourceBin.Text, lblRequireMaterialNo.Text };
                    PCSMessageBox.Show(ErrorCode.MESSAGE_SELECT_ONE_BEFORE_SELECT_ONE, MessageBoxIcon.Warning, msgs);
                    txtFGoodsCode.Focus();
                    return;
                }
                if (txtFGoodsCode.Text.Trim() == string.Empty)
                {
                    string[] msgs = { lblFGoodsCode.Text, lblRequireMaterialNo.Text };
                    PCSMessageBox.Show(ErrorCode.MESSAGE_SELECT_ONE_BEFORE_SELECT_ONE, MessageBoxIcon.Warning, msgs);
                    txtFGoodsCode.Focus();
                    return;
                }
                Hashtable htbCriterial = new Hashtable();
                DataRowView drwResult = null;
                htbCriterial.Add(PRO_RequiredMaterialMasterTable.SALEORDERDETAILID_FLD, txtFGoodsCode.Tag.ToString());
                //htbCriterial.Add(PRO_RequiredMaterialMasterTable.USERAPPROVAL_FLD, string.Empty);

                drwResult = FormControlComponents.OpenSearchForm(REQUIRED_MATERIAL_VIEW, PRO_RequiredMaterialMasterTable.TRANSNO_FLD, txtRequireMaterialNo.Text, htbCriterial, false);
                if (drwResult != null)
                    FillRequiredMaterialData(drwResult);
                else
                    e.Cancel = true;
            }
            catch (PCSException ex)
            {
                PCSMessageBox.Show(ex.mCode, MessageBoxIcon.Error);
                try
                {
                    Logger.LogMessage(ex.CauseException, METHOD_NAME, Level.ERROR);
                }
                catch
                {
                    PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION);
                }
            }
            catch (Exception ex)
            {
                PCSMessageBox.Show(ErrorCode.OTHER_ERROR);
                try
                {
                    Logger.LogMessage(ex, METHOD_NAME, Level.ERROR);
                }
                catch
                {
                    PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION);
                }
            }
        }

        #endregion

        #region Keydown event
        private void txtSourceMasLoc_KeyDown(object sender, System.Windows.Forms.KeyEventArgs e)
        {
            switch (e.KeyCode)
            {
                case Keys.F4:
                    btnSourceMasLoc_Click(sender, e);
                    break;
            }
        }

        private void txtSourceLoc_KeyDown(object sender, System.Windows.Forms.KeyEventArgs e)
        {
            switch (e.KeyCode)
            {
                case Keys.F4:
                    btnSourceLoc_Click(sender, e);
                    break;
            }
        }

        private void txtSourceBin_KeyDown(object sender, System.Windows.Forms.KeyEventArgs e)
        {
            switch (e.KeyCode)
            {
                case Keys.F4:
                    btnSourceBin_Click(sender, e);
                    break;
            }
        }

        private void txtDestMasLoc_KeyDown(object sender, System.Windows.Forms.KeyEventArgs e)
        {
            switch (e.KeyCode)
            {
                case Keys.F4:
                    btnDestMasLoc_Click(sender, e);
                    break;
            }
        }

        private void txtDestLoc_KeyDown(object sender, System.Windows.Forms.KeyEventArgs e)
        {
            switch (e.KeyCode)
            {
                case Keys.F4:
                    btnDestLoc_Click(sender, e);
                    break;
            }
        }

        private void txtDestBin_KeyDown(object sender, System.Windows.Forms.KeyEventArgs e)
        {
            switch (e.KeyCode)
            {
                case Keys.F4:
                    btnDestBin_Click(sender, e);
                    break;
            }
        }
        private void txtTransNo_KeyDown(object sender, System.Windows.Forms.KeyEventArgs e)
        {
            const string METHOD_NAME = THIS + ".txtTransNo_KeyDown()";
            try
            {
                if (btnTransNo.Enabled)
                {
                    if (e.KeyCode == Keys.F4)
                    {
                        btnTransNo_Click(sender, new EventArgs());
                    }
                }
            }
            catch (PCSException ex)
            {
                PCSMessageBox.Show(ex.mCode, MessageBoxIcon.Error);
                try
                {
                    Logger.LogMessage(ex.CauseException, METHOD_NAME, Level.ERROR);
                }
                catch
                {
                    PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxIcon.Error);
                }
            }
            catch (Exception ex)
            {
                PCSMessageBox.Show(ErrorCode.OTHER_ERROR, MessageBoxIcon.Error);
                try
                {
                    Logger.LogMessage(ex, METHOD_NAME, Level.ERROR);
                }
                catch
                {
                    PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxIcon.Error);
                }
            }
        }
        private void IVLocToLocTransfer_KeyDown(object sender, System.Windows.Forms.KeyEventArgs e)
        {
            const string METHOD_NAME = THIS + ".WorkOrder_KeyDown()";
            try
            {
                if (e.KeyCode == Keys.F12)
                {
                    if (!dgrdData.Splits[0].DisplayColumns[PART_NUMBER_FLD].Locked)
                    {
                        dgrdData.Row = dgrdData.RowCount - 1;
                        dgrdData.Col = dgrdData.Columns.IndexOf(dgrdData.Columns[PART_NUMBER_FLD]);
                        dgrdData.Focus();
                        dgrdData.EditActive = false;
                    }
                }

                #region // HACK: DEL SonHT 2005-10-20

                //				if (e.KeyCode == Keys.Escape)
                //				{
                //					btnClose_Click(btnClose, e);
                //				}

                #endregion // END: DEL SonHT 2005-10-20
            }
            catch (PCSException ex)
            {
                PCSMessageBox.Show(ex.mCode, MessageBoxIcon.Error);
                try
                {
                    Logger.LogMessage(ex.CauseException, METHOD_NAME, Level.ERROR);
                }
                catch
                {
                    PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxIcon.Error);
                }
            }
            catch (Exception ex)
            {
                PCSMessageBox.Show(ErrorCode.OTHER_ERROR, MessageBoxIcon.Error);
                try
                {
                    Logger.LogMessage(ex, METHOD_NAME, Level.ERROR);
                }
                catch
                {
                    PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxIcon.Error);
                }
            }
        }

        private void txtPurpose_KeyDown(object sender, System.Windows.Forms.KeyEventArgs e)
        {
            const string METHOD_NAME = THIS + ".txtPurpose_KeyDown()";
            try
            {
                if (e.KeyCode == Keys.F4 && btnPurpose.Enabled)
                {
                    btnPurpose_Click(btnPurpose, new EventArgs());
                }
            }
            catch (PCSException ex)
            {
                // Displays the error message if throwed from PCSException.
                PCSMessageBox.Show(ex.mCode, MessageBoxIcon.Error);
                try
                {
                    // Log error message into log file.
                    Logger.LogMessage(ex.CauseException, METHOD_NAME, Level.ERROR);
                }
                catch
                {
                    // Show message if logger has an error.
                    PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxIcon.Error);
                }
            }
            catch (Exception ex)
            {
                // Displays the error message if throwed from system.
                PCSMessageBox.Show(ErrorCode.OTHER_ERROR, MessageBoxIcon.Error);
                try
                {
                    // Log error message into log file.
                    Logger.LogMessage(ex, METHOD_NAME, Level.ERROR);
                }
                catch
                {
                    // Show message if logger has an error.
                    PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxIcon.Error);
                }
            }
        }
        private void txtParty_KeyDown(object sender, System.Windows.Forms.KeyEventArgs e)
        {
            const string METHOD_NAME = THIS + ".txtParty_KeyDown()";
            try
            {
                if (e.KeyCode == Keys.F4 && btnParty.Enabled)
                {
                    btnParty_Click(btnPurpose, new EventArgs());
                }
            }
            catch (PCSException ex)
            {
                // Displays the error message if throwed from PCSException.
                PCSMessageBox.Show(ex.mCode, MessageBoxIcon.Error);
                try
                {
                    // Log error message into log file.
                    Logger.LogMessage(ex.CauseException, METHOD_NAME, Level.ERROR);
                }
                catch
                {
                    // Show message if logger has an error.
                    PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxIcon.Error);
                }
            }
            catch (Exception ex)
            {
                // Displays the error message if throwed from system.
                PCSMessageBox.Show(ErrorCode.OTHER_ERROR, MessageBoxIcon.Error);
                try
                {
                    // Log error message into log file.
                    Logger.LogMessage(ex, METHOD_NAME, Level.ERROR);
                }
                catch
                {
                    // Show message if logger has an error.
                    PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxIcon.Error);
                }
            }
        }
        private void txtPartyName_KeyDown(object sender, System.Windows.Forms.KeyEventArgs e)
        {
            const string METHOD_NAME = THIS + ".txtPartyName_KeyDown()";
            try
            {
                if (e.KeyCode == Keys.F4 && btnPartyName.Enabled)
                {
                    btnPartyName_Click(btnPurpose, new EventArgs());
                }
            }
            catch (PCSException ex)
            {
                // Displays the error message if throwed from PCSException.
                PCSMessageBox.Show(ex.mCode, MessageBoxIcon.Error);
                try
                {
                    // Log error message into log file.
                    Logger.LogMessage(ex.CauseException, METHOD_NAME, Level.ERROR);
                }
                catch
                {
                    // Show message if logger has an error.
                    PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxIcon.Error);
                }
            }
            catch (Exception ex)
            {
                // Displays the error message if throwed from system.
                PCSMessageBox.Show(ErrorCode.OTHER_ERROR, MessageBoxIcon.Error);
                try
                {
                    // Log error message into log file.
                    Logger.LogMessage(ex, METHOD_NAME, Level.ERROR);
                }
                catch
                {
                    // Show message if logger has an error.
                    PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxIcon.Error);
                }
            }
        }

        private void txtFGoodsCode_KeyDown(object sender, System.Windows.Forms.KeyEventArgs e)
        {
            if (e.KeyCode == Keys.F4)
                btnFGoodsCode_Click(null, null);
        }

        private void txtRequireMaterialNo_KeyDown(object sender, System.Windows.Forms.KeyEventArgs e)
        {
            if (e.KeyCode == Keys.F4)
                btnRequireMaterialNo_Click(null, null);
        }

        #endregion

        #region Grid Events
        private void dgrdData_ButtonClick(object sender, C1.Win.C1TrueDBGrid.ColEventArgs e)
        {
            const string METHOD_NAME = THIS + ".dgrdData_ButtonClick()";
            try
            {
                DataRowView drwResult = null;
                Hashtable htbCondition = new Hashtable();
                string strValue = string.Empty;
                if (dgrdData.AddNewMode == AddNewModeEnum.AddNewCurrent)
                    strValue = dgrdData[dgrdData.Row, dgrdData.Col].ToString();
                else
                    strValue = dgrdData.Columns[dgrdData.Col].Text.Trim();
                if (!btnSave.Enabled) return;
                if (Convert.ToInt32(txtPurpose.Tag).Equals((int)PurposeEnum.IssueMaterial))
                    return;
                if (dgrdData.Col == dgrdData.Columns.IndexOf(dgrdData.Columns[PART_NUMBER_FLD])
                    || dgrdData.Col == dgrdData.Columns.IndexOf(dgrdData.Columns[PART_NAME_FLD]))
                {
                    if (txtSourceLoc.Text.Trim() == string.Empty)
                    {
                        PCSMessageBox.Show(ErrorCode.MESSAGE_LOCTOLOC_SELECT_LOCATION);
                        txtSourceLoc.Focus();
                        return;
                    }

                    //if location with bin
                    if (lblSourceLoc.Tag.ToString() == true.ToString())
                    {
                        if (txtSourceBin.Text.Trim() == string.Empty)
                        {
                            PCSMessageBox.Show(ErrorCode.MESSAGE_LOCTOLOC_SELECT_SOURCE_BIN);
                            txtSourceBin.Focus();
                            return;
                        }
                    }

                    //open the search form to select Product
                    if (txtSourceLoc.Text.Trim() != string.Empty)
                    {
                        if (txtSourceBin.Text.Trim() != string.Empty)
                        {
                            htbCondition.Add(ITM_ProductTable.BINID_FLD, txtSourceBin.Tag.ToString());
                            htbCondition.Add(ITM_ProductTable.LOCATIONID_FLD, txtSourceLoc.Tag.ToString());
                            //if (PART_NUMBER_FLD == e.Column.DataColumn.DataField)
                            if (dgrdData.Col == dgrdData.Columns.IndexOf(dgrdData.Columns[PART_NUMBER_FLD]))
                                drwResult = FormControlComponents.OpenSearchForm(VIEW_BIN_CACHE, ITM_ProductTable.CODE_FLD, strValue, htbCondition, true);
                            else
                                drwResult = FormControlComponents.OpenSearchForm(VIEW_BIN_CACHE, ITM_ProductTable.DESCRIPTION_FLD, strValue, htbCondition, true);
                            if (drwResult != null)
                                FillItemDataToGrid(drwResult.Row);
                        }
                        else
                        {
                            htbCondition.Add(ITM_ProductTable.LOCATIONID_FLD, txtSourceLoc.Tag.ToString());
                            if (dgrdData.Col == dgrdData.Columns.IndexOf(dgrdData.Columns[PART_NUMBER_FLD]))
                                drwResult = FormControlComponents.OpenSearchForm(VIEW_LOCATION_CACHE, ITM_ProductTable.CODE_FLD, strValue, htbCondition, true);
                            else
                                drwResult = FormControlComponents.OpenSearchForm(VIEW_LOCATION_CACHE, ITM_ProductTable.DESCRIPTION_FLD, strValue, htbCondition, true);
                            if (drwResult != null)
                                FillItemDataToGrid(drwResult.Row);
                        }
                    }


                }
                if (dgrdData.Col == dgrdData.Columns.IndexOf(dgrdData.Columns[IV_MiscellaneousIssueDetailTable.LOT_FLD]))
                {
                    if (dgrdData[dgrdData.Row, PART_NUMBER_FLD].ToString() == string.Empty)
                    {
                        PCSMessageBox.Show(ErrorCode.MESSAGE_LOCTOLOC_SELECT_ITEM_BEFORE_SELECT_LOT);
                        return;
                    }
                    else
                    {
                        if (txtSourceBin.Text.Trim() != string.Empty)
                        {
                            htbCondition.Add(IV_BinCacheTable.BINID_FLD, txtSourceBin.Tag.ToString());
                            htbCondition.Add(IV_BinCacheTable.PRODUCTID_FLD, int.Parse(dgrdData[dgrdData.Row, IV_MiscellaneousIssueDetailTable.PRODUCTID_FLD].ToString()));
                            if (dgrdData.AddNewMode != AddNewModeEnum.AddNewPending)
                            {
                                drwResult = FormControlComponents.OpenSearchForm(IV_BinCacheTable.TABLE_NAME, IV_MiscellaneousIssueDetailTable.LOT_FLD, dgrdData[dgrdData.Row, IV_MiscellaneousIssueDetailTable.LOT_FLD].ToString(), htbCondition, true);
                            }
                            else
                            {
                                drwResult = FormControlComponents.OpenSearchForm(IV_BinCacheTable.TABLE_NAME, IV_MiscellaneousIssueDetailTable.LOT_FLD, dgrdData.Columns[IV_MiscellaneousIssueDetailTable.LOT_FLD].Text.Trim(), htbCondition, true);
                            }
                            if (drwResult != null)
                            {
                                e.Column.DataColumn.Value = drwResult[IV_MiscellaneousIssueDetailTable.LOT_FLD].ToString();
                                FillLotAndAutoFillSerial(drwResult.Row);
                            }
                        }
                        else
                        {
                            htbCondition.Add(IV_LocationCacheTable.LOCATIONID_FLD, txtSourceLoc.Tag.ToString());
                            htbCondition.Add(IV_LocationCacheTable.PRODUCTID_FLD, int.Parse(dgrdData[dgrdData.Row, IV_MiscellaneousIssueDetailTable.PRODUCTID_FLD].ToString()));
                            if (dgrdData.AddNewMode != AddNewModeEnum.AddNewPending)
                            {
                                drwResult = FormControlComponents.OpenSearchForm(IV_LocationCacheTable.TABLE_NAME, IV_MiscellaneousIssueDetailTable.LOT_FLD, dgrdData[dgrdData.Row, IV_MiscellaneousIssueDetailTable.LOT_FLD].ToString(), htbCondition, true);
                            }
                            else
                            {
                                drwResult = FormControlComponents.OpenSearchForm(IV_LocationCacheTable.TABLE_NAME, IV_MiscellaneousIssueDetailTable.LOT_FLD, dgrdData.Columns[IV_MiscellaneousIssueDetailTable.LOT_FLD].Text.Trim(), htbCondition, true);
                            }
                            if (drwResult != null)
                            {
                                e.Column.DataColumn.Value = drwResult[IV_MiscellaneousIssueDetailTable.LOT_FLD].ToString();
                                FillLotAndAutoFillSerial(drwResult.Row);
                            }
                        }
                    }
                }
            }
            catch (PCSException ex)
            {
                PCSMessageBox.Show(ex.mCode, MessageBoxIcon.Error);
                try
                {
                    Logger.LogMessage(ex.CauseException, METHOD_NAME, Level.ERROR);
                }
                catch
                {
                    PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxIcon.Error);
                }
            }
            catch (Exception ex)
            {
                PCSMessageBox.Show(ErrorCode.OTHER_ERROR, MessageBoxIcon.Error);
                try
                {
                    Logger.LogMessage(ex, METHOD_NAME, Level.ERROR);
                }
                catch
                {
                    PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxIcon.Error);
                }
            }
        }
        private void dgrdData_BeforeColUpdate(object sender, C1.Win.C1TrueDBGrid.BeforeColUpdateEventArgs e)
        {
            const string METHOD_NAME = THIS + ".dgrdData_BeforeColUpdate()";
            try
            {
                Hashtable htbCriteria = new Hashtable();
                DataRowView drwResult = null;
                if (e.Column.DataColumn.DataField == PART_NUMBER_FLD
                    || e.Column.DataColumn.DataField == PART_NAME_FLD)
                {
                    if (Convert.ToInt32(txtPurpose.Tag).Equals((int)PurposeEnum.IssueMaterial))
                    {
                        e.Cancel = true;
                        return;
                    }
                    # region open Product search form
                    if (dgrdData.Columns[e.Column.DataColumn.DataField].Text.Trim() != string.Empty)
                    {
                        if (txtSourceLoc.Text.Trim() != string.Empty)
                        {
                            if (txtSourceBin.Text.Trim() != string.Empty)
                                htbCriteria.Add(ITM_ProductTable.BINID_FLD, txtSourceBin.Tag.ToString());
                            else
                                htbCriteria.Add(ITM_ProductTable.LOCATIONID_FLD, txtSourceLoc.Tag.ToString());
                        }
                        else
                        {
                            PCSMessageBox.Show(ErrorCode.MESSAGE_LOCTOLOC_SELECT_LOCATION);
                            e.Cancel = true;
                            return;
                        }
                        if (txtSourceBin.Text.Trim() != string.Empty)
                        {
                            if (e.Column.DataColumn.DataField == PART_NUMBER_FLD)
                                drwResult = FormControlComponents.OpenSearchForm(VIEW_BIN_CACHE, ITM_ProductTable.CODE_FLD, dgrdData.Columns[e.Column.DataColumn.DataField].Text.Trim(), htbCriteria, false);
                            else
                                drwResult = FormControlComponents.OpenSearchForm(VIEW_BIN_CACHE, ITM_ProductTable.DESCRIPTION_FLD, dgrdData.Columns[e.Column.DataColumn.DataField].Text.Trim(), htbCriteria, false);
                        }
                        else
                        {
                            if (e.Column.DataColumn.DataField == PART_NUMBER_FLD)
                                drwResult = FormControlComponents.OpenSearchForm(VIEW_LOCATION_CACHE, ITM_ProductTable.CODE_FLD, dgrdData.Columns[e.Column.DataColumn.DataField].Text.Trim(), htbCriteria, false);
                            else
                                drwResult = FormControlComponents.OpenSearchForm(VIEW_LOCATION_CACHE, ITM_ProductTable.DESCRIPTION_FLD, dgrdData.Columns[e.Column.DataColumn.DataField].Text.Trim(), htbCriteria, false);
                        }
                        if (drwResult != null)
                            e.Column.DataColumn.Tag = drwResult.Row;
                        else
                            e.Cancel = true;
                    }
                    #endregion
                }

                //check quantity
                if (dgrdData.Splits[0].DisplayColumns[dgrdData.Col].DataColumn.DataField == IV_MiscellaneousIssueDetailTable.QUANTITY_FLD)
                {
                    try
                    {
                        if (dgrdData.Splits[0].DisplayColumns[dgrdData.Col].DataColumn.Value.ToString() == string.Empty)
                            return;
                        decimal fQuantity = decimal.Parse(dgrdData.Splits[0].DisplayColumns[dgrdData.Col].DataColumn.Value.ToString());
                        if (fQuantity <= 0)
                        {
                            PCSMessageBox.Show(ErrorCode.POSITIVE_NUMBER, MessageBoxIcon.Error);
                            e.Cancel = true;
                            return;
                        }
                        else
                        {
                            if (dgrdData[dgrdData.Row, IV_MiscellaneousIssueDetailTable.PRODUCTID_FLD].ToString() == string.Empty)
                            {
                                PCSMessageBox.Show(ErrorCode.MESSAGE_INPUT_ITEM_FIELD, MessageBoxIcon.Error);
                                e.Cancel = true;
                                return;
                            }
                            if (Decimal.Parse(dgrdData.Splits[0].DisplayColumns[dgrdData.Col].DataColumn.Value.ToString()) > decimal.Parse(dgrdData[dgrdData.Row, IV_MiscellaneousIssueDetailTable.AVAILABLEQTY_FLD].ToString()))
                            {
                                PCSMessageBox.Show(ErrorCode.MESSAGE_MATERIALISSUE_INVALID_ISSUE_QTY, MessageBoxIcon.Error);
                                e.Cancel = true;
                                return;
                            }
                            if (txtPurpose.Tag.Equals((int)PurposeEnum.IssueMaterial))
                            {
                                if (Decimal.Parse(dgrdData.Splits[0].DisplayColumns[dgrdData.Col].DataColumn.Value.ToString()) > decimal.Parse(dgrdData[dgrdData.Row, PRO_RequiredMaterialDetailTable.QUANTITY_FLD].ToString()))
                                {
                                    string[] strMsg = new string[] { "0", dgrdData[dgrdData.Row, PRO_RequiredMaterialDetailTable.QUANTITY_FLD].ToString() };
                                    PCSMessageBox.Show(ErrorCode.MESSAGE_NUMBER_MUST_IN_SCOPE, MessageBoxIcon.Error, strMsg);
                                    e.Cancel = true;
                                    return;
                                }
                            }
                        }
                    }
                    catch
                    {
                        //cancel update and throw PCSException
                        e.Cancel = true;
                        PCSMessageBox.Show(ErrorCode.POSITIVE_NUMBER, MessageBoxIcon.Error);
                        return;
                    }
                }
            }
            catch (PCSException ex)
            {
                PCSMessageBox.Show(ex.mCode, MessageBoxIcon.Error);
                try
                {
                    Logger.LogMessage(ex.CauseException, METHOD_NAME, Level.ERROR);
                }
                catch
                {
                    PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxIcon.Error);
                }
            }
            catch (Exception ex)
            {
                PCSMessageBox.Show(ErrorCode.OTHER_ERROR, MessageBoxIcon.Error);
                try
                {
                    Logger.LogMessage(ex, METHOD_NAME, Level.ERROR);
                }
                catch
                {
                    PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxIcon.Error);
                }
            }
        }

        private void dgrdData_AfterColUpdate(object sender, C1.Win.C1TrueDBGrid.ColEventArgs e)
        {
            const string METHOD_NAME = THIS + ".dgrdData_AfterColUpdate()";
            try
            {
                if (e.Column.DataColumn.DataField == PART_NUMBER_FLD)
                {
                    if ((e.Column.DataColumn.Tag == null) || (dgrdData[dgrdData.Row, PART_NUMBER_FLD].ToString() == string.Empty))
                    {
                        dgrdData[dgrdData.Row, IV_MiscellaneousIssueDetailTable.PRODUCTID_FLD] = DBNull.Value;
                        dgrdData[dgrdData.Row, PART_NUMBER_FLD] = string.Empty;
                        dgrdData[dgrdData.Row, PART_NAME_FLD] = string.Empty;
                        dgrdData[dgrdData.Row, MODEL_FLD] = string.Empty;
                        dgrdData[dgrdData.Row, UNIT_FLD] = string.Empty;
                        dgrdData[dgrdData.Row, IV_MiscellaneousIssueDetailTable.LOT_FLD] = string.Empty;
                        dgrdData[dgrdData.Row, IV_MiscellaneousIssueDetailTable.AVAILABLEQTY_FLD] = string.Empty;
                        dgrdData[dgrdData.Row, LOT_CONTROL_FLD] = string.Empty;
                    }
                    else
                    {
                        FillItemDataToGrid((DataRow)e.Column.DataColumn.Tag);
                        return;
                    }
                }
                if (e.Column.DataColumn.DataField == PART_NAME_FLD)
                {
                    if ((e.Column.DataColumn.Tag == null) || (dgrdData[dgrdData.Row, PART_NAME_FLD].ToString() == string.Empty))
                    {
                        dgrdData[dgrdData.Row, IV_MiscellaneousIssueDetailTable.PRODUCTID_FLD] = DBNull.Value;
                        dgrdData[dgrdData.Row, PART_NUMBER_FLD] = string.Empty;
                        dgrdData[dgrdData.Row, PART_NAME_FLD] = string.Empty;
                        dgrdData[dgrdData.Row, MODEL_FLD] = string.Empty;
                        dgrdData[dgrdData.Row, UNIT_FLD] = string.Empty;
                        dgrdData[dgrdData.Row, IV_MiscellaneousIssueDetailTable.LOT_FLD] = string.Empty;
                        dgrdData[dgrdData.Row, IV_MiscellaneousIssueDetailTable.AVAILABLEQTY_FLD] = string.Empty;
                        dgrdData[dgrdData.Row, LOT_CONTROL_FLD] = string.Empty;
                    }
                    else
                    {
                        FillItemDataToGrid((DataRow)e.Column.DataColumn.Tag);
                        return;
                    }
                }

                if (e.Column.DataColumn.DataField == IV_MiscellaneousIssueDetailTable.LOT_FLD)
                {
                    if ((dgrdData[dgrdData.Row, IV_MiscellaneousIssueDetailTable.LOT_FLD].ToString() == string.Empty))
                    {
                    }
                    else
                    {
                        Hashtable htbCriterial = new Hashtable();
                        DataRow drowData;
                        htbCriterial.Add(IV_MiscellaneousIssueDetailTable.PRODUCTID_FLD, dgrdData[dgrdData.Row, IV_MiscellaneousIssueDetailTable.PRODUCTID_FLD].ToString());
                        htbCriterial.Add(MST_LocationTable.LOCATIONID_FLD, txtSourceLoc.Tag.ToString());

                        if (txtSourceBin.Text != string.Empty)
                        {
                            htbCriterial.Add(MST_BINTable.BINID_FLD, txtSourceBin.Tag.ToString());
                            drowData = new UtilsBO().GetRows(VIEW_NAME, PART_NUMBER_FLD, dgrdData[dgrdData.Row, PART_NUMBER_FLD].ToString(), htbCriterial).Rows[0];
                            dgrdData[dgrdData.Row, IV_MiscellaneousIssueDetailTable.AVAILABLEQTY_FLD] = drowData[BIN_AVAILABLE_QUANTITY_FLD].ToString();
                        }
                        else
                        {
                            drowData = new UtilsBO().GetRows(VIEW_NAME, PART_NUMBER_FLD, dgrdData[dgrdData.Row, PART_NUMBER_FLD].ToString(), htbCriterial).Rows[0];
                            dgrdData[dgrdData.Row, IV_MiscellaneousIssueDetailTable.AVAILABLEQTY_FLD] = drowData[BIN_AVAILABLE_QUANTITY_FLD].ToString();
                        }
                    }
                }
            }
            catch (PCSException ex)
            {
                PCSMessageBox.Show(ex.mCode, MessageBoxIcon.Error);
                try
                {
                    Logger.LogMessage(ex.CauseException, METHOD_NAME, Level.ERROR);
                }
                catch
                {
                    PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxIcon.Error);
                }
            }
            catch (Exception ex)
            {
                PCSMessageBox.Show(ErrorCode.OTHER_ERROR, MessageBoxIcon.Error);
                try
                {
                    Logger.LogMessage(ex, METHOD_NAME, Level.ERROR);
                }
                catch
                {
                    PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxIcon.Error);
                }
            }
        }

        private void dgrdData_KeyDown(object sender, System.Windows.Forms.KeyEventArgs e)
        {
            const string METHOD_NAME = THIS + ".dgrdData_KeyDown()";
            try
            {
                switch (e.KeyCode)
                {
                    case Keys.F4:
                        if (btnSave.Enabled)
                        {
                            dgrdData_ButtonClick(sender, null);
                        }
                        break;
                    case Keys.Delete:
                        FormControlComponents.DeleteMultiRowsOnTrueDBGrid(dgrdData);
                        for (int i = 0; i < dgrdData.RowCount - 1; i++)
                        {
                            dgrdData[i, SO_DeliveryScheduleTable.LINE_FLD] = i + 1;
                        }
                        break;
                }
            }
            catch (PCSException ex)
            {
                PCSMessageBox.Show(ex.mCode, MessageBoxIcon.Error);
                try
                {
                    Logger.LogMessage(ex.CauseException, METHOD_NAME, Level.ERROR);
                }
                catch
                {
                    PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxIcon.Error);
                }
            }
            catch (Exception ex)
            {
                PCSMessageBox.Show(ErrorCode.OTHER_ERROR, MessageBoxIcon.Error);
                try
                {
                    Logger.LogMessage(ex, METHOD_NAME, Level.ERROR);
                }
                catch
                {
                    PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxIcon.Error);
                }
            }
        }
        #endregion

        private void dtmPostDate_DropDownClosed(object sender, System.EventArgs e)
        {
            if (dtmPostDate.Text == string.Empty)
            {
                dtmPostDate.Value = DBNull.Value;
            }
        }

        private void txtInvoice_Validating(object sender, System.ComponentModel.CancelEventArgs e)
        {
            const string METHOD_NAME = THIS + ".txtInvoice_Validating()";
            try
            {
                if (txtInvoice.Modified)
                {
                    if (txtInvoice.Text.Trim().Length > 0)
                    {
                        DataRowView drwResult = FormControlComponents.OpenSearchForm(PO_InvoiceMasterTable.TABLE_NAME, PO_InvoiceMasterTable.INVOICENO_FLD, txtInvoice.Text, null, false);
                        if (drwResult != null)
                        {
                            txtInvoice.Text = drwResult[PO_InvoiceMasterTable.INVOICENO_FLD].ToString();
                            txtInvoice.Tag = Convert.ToInt32(drwResult[PO_InvoiceMasterTable.INVOICEMASTERID_FLD]);
                        }
                        else
                            e.Cancel = true;
                    }
                    else
                    {
                        txtInvoice.Text = string.Empty;
                        txtInvoice.Tag = null;
                    }
                }
            }
            catch (PCSException ex)
            {
                PCSMessageBox.Show(ex.mCode, MessageBoxIcon.Error);
                try
                {
                    Logger.LogMessage(ex.CauseException, METHOD_NAME, Level.ERROR);
                }
                catch
                {
                    PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION);
                }
            }
            catch (Exception ex)
            {
                PCSMessageBox.Show(ErrorCode.OTHER_ERROR);
                try
                {
                    Logger.LogMessage(ex, METHOD_NAME, Level.ERROR);
                }
                catch
                {
                    PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION);
                }
            }
        }

        private void txtInvoice_KeyDown(object sender, System.Windows.Forms.KeyEventArgs e)
        {
            const string METHOD_NAME = THIS + ".txtInvoice_KeyDown()";
            try
            {
                if (e.KeyCode == Keys.F4)
                    btnInvoice_Click(null, null);
            }
            catch (PCSException ex)
            {
                PCSMessageBox.Show(ex.mCode, MessageBoxIcon.Error);
                try
                {
                    Logger.LogMessage(ex.CauseException, METHOD_NAME, Level.ERROR);
                }
                catch
                {
                    PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION);
                }
            }
            catch (Exception ex)
            {
                PCSMessageBox.Show(ErrorCode.OTHER_ERROR);
                try
                {
                    Logger.LogMessage(ex, METHOD_NAME, Level.ERROR);
                }
                catch
                {
                    PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION);
                }
            }
        }

        private void btnInvoice_Click(object sender, System.EventArgs e)
        {
            const string METHOD_NAME = THIS + ".btnInvoice_Click()";
            try
            {
                DataRowView drwResult = FormControlComponents.OpenSearchForm(PO_InvoiceMasterTable.TABLE_NAME, PO_InvoiceMasterTable.INVOICENO_FLD, txtInvoice.Text, null, true);
                if (drwResult != null)
                {
                    txtInvoice.Text = drwResult[PO_InvoiceMasterTable.INVOICENO_FLD].ToString();
                    txtInvoice.Tag = Convert.ToInt32(drwResult[PO_InvoiceMasterTable.INVOICEMASTERID_FLD]);
                }
                else
                    txtInvoice.Focus();
            }
            catch (PCSException ex)
            {
                PCSMessageBox.Show(ex.mCode, MessageBoxIcon.Error);
                try
                {
                    Logger.LogMessage(ex.CauseException, METHOD_NAME, Level.ERROR);
                }
                catch
                {
                    PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION);
                }
            }
            catch (Exception ex)
            {
                PCSMessageBox.Show(ErrorCode.OTHER_ERROR);
                try
                {
                    Logger.LogMessage(ex, METHOD_NAME, Level.ERROR);
                }
                catch
                {
                    PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION);
                }
            }
        }
    }
}
